Browse Source

* Fixed test crash with -Cg on non-Darwin targets: the GOT slot stores address of symbol, not its value.

git-svn-id: trunk@21974 -
sergei 13 years ago
parent
commit
1763309d8e
1 changed files with 4 additions and 2 deletions
  1. 4 2
      tests/test/testsse2.pp

+ 4 - 2
tests/test/testsse2.pp

@@ -24,9 +24,11 @@ begin
 {$else darwin}
 {$else darwin}
        addl      $_GLOBAL_OFFSET_TABLE_+1,%ecx
        addl      $_GLOBAL_OFFSET_TABLE_+1,%ecx
        movdqa    %xmm1,%xmm2
        movdqa    %xmm1,%xmm2
-       movdqa    q@GOT(%ecx),%xmm4
+       movl      q@GOT(%ecx),%eax
+       movdqa    (%eax),%xmm4
        psubq     %xmm1,%xmm2
        psubq     %xmm1,%xmm2
-       psubq     q@GOT(%ecx),%xmm4
+       movl      q@GOT(%ecx),%eax
+       psubq     (%eax),%xmm4
 {$endif darwin}
 {$endif darwin}
 {$else FPC_PIC}
 {$else FPC_PIC}
        movdqa    %xmm1,%xmm2
        movdqa    %xmm1,%xmm2