+ added lwsync instruction to the compiler

* fixed compilation of ReadDependencyBarrier

git-svn-id: trunk@8243 -
This commit is contained in:
Jonas Maebe 2007-08-08 09:15:48 +00:00
parent ad43c6a989
commit 98ad33a0c7
4 changed files with 10 additions and 3 deletions

View File

@ -2046,6 +2046,9 @@ begin
{$ifdef SUPPORT_UNALIGNED}
def_system_macro('FPC_SUPPORTS_UNALIGNED');
{$endif SUPPORT_UNALIGNED}
{$ifdef powerpc64}
def_system_macro('FPC_HAS_LWSYNC');
{$endif}
{$if defined(x86) or defined(arm)}
def_system_macro('INTERNAL_BACKTRACE');

View File

@ -103,7 +103,8 @@ type
A_MULLDO, A_MULLDO_, A_MULHDU, A_MULHDU_,
A_MFXER,
A_FCTID, A_FCTID_, A_FCTIDZ, A_FCTIDZ_,
A_EXTRDI, A_EXTRDI_, A_INSRDI, A_INSRDI_);
A_EXTRDI, A_EXTRDI_, A_INSRDI, A_INSRDI_,
A_LWSYNC);
{# This should define the array of instructions as string }
op2strtable = array[tasmop] of string[8];

View File

@ -93,7 +93,8 @@ const
'mulldo', 'mulldo.', 'mulhdu', 'mulhdu.',
'mfxer',
'fctid', 'fctid.', 'fctidz', 'fctidz.',
'extrdi', 'extrdi.', 'insrdi', 'insrdi.');
'extrdi', 'extrdi.', 'insrdi', 'insrdi.',
'lwsync');
function gas_regnum_search(const s: string): Tregister;
function gas_regname(r: Tregister): string;

View File

@ -842,11 +842,13 @@ end;
procedure ReadBarrier;assembler;nostackframe;{$ifdef SYSTEMINLINE}inline;{$endif}
asm
{$ifdef FPC_HAS_LWSYNC}
lwsync
{$endif}
end;
procedure ReadDependencyBarrier;{$ifdef SYSTEMINLINE}inline;{$endif}
asm
begin
{ reads imply barrier on earlier reads depended on }
end;