* fix for older GAS assemblers that don't parse (rex64Z) "lock cmpxchg8b (%r8)" properly, as used on FreeBSD7 and up till 8.2.

git-svn-id: trunk@17060 -
This commit is contained in:
marco 2011-03-02 14:45:38 +00:00
parent 5d906a8f1d
commit f0fee289c9

View File

@ -18,6 +18,13 @@ unit cpu;
interface
{$ifdef freebsd} // FreeBSD 7/8 have binutils version that don't support cmpxchg16b
// Unless overridebinutils is defined (for ports usage), use db instead of the instruction
{$ifndef overridebinutils}
{$define oldbinutils}
{$endif}
{$endif}
uses
sysutils;
@ -60,8 +67,11 @@ unit cpu;
movq (%r9),%rax
movq 8(%r9),%rdx
{$ifdef oldbinutils}
.byte 0xF0,0x49,0x0F,0xC7,0x08
{$else}
lock cmpxchg16b (%r8)
{$endif}
{ restore result pointer }
popq %rcx