소스 검색

* Another fix to PIC assembler: GOT slot stores the address of variable, not variable itself.

git-svn-id: trunk@24127 -
sergei 12 년 전
부모
커밋
37a347ce7b
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      tests/test/opt/tretopt.pp

+ 4 - 2
tests/test/opt/tretopt.pp

@@ -295,7 +295,8 @@ begin
     movl %eax,p3-.Lpic(%ecx)
 {$else darwin}
    addl $_GLOBAL_OFFSET_TABLE_+1,%ecx
-   movl %eax,p3@GOT(%ecx)
+   movl p3@GOT(%ecx),%edx
+   movl %eax,(%edx)
 {$endif darwin}
 {$endif FPC_PIC}
 {$endif cpui386}
@@ -350,7 +351,8 @@ begin
     movl %eax,p3-.Lpic(%ecx)
 {$else darwin}
    addl $_GLOBAL_OFFSET_TABLE_+1,%ecx
-   movl %eax,p3@GOT(%ecx)
+   movl p3@GOT(%ecx),%edx
+   movl %eax,(%edx)
 {$endif darwin}
 {$endif FPC_PIC}
 {$endif}