소스 검색

* always use RIP-relative addressing in x86-64 assembler code
* abort if there's a warning (warnings for wrong/dangerous pic
will be added in a later commit)

git-svn-id: trunk@22239 -

Jonas Maebe 13 년 전
부모
커밋
ab9d68ae3e
2개의 변경된 파일3개의 추가작업 그리고 13개의 파일을 삭제
  1. 1 0
      tests/test/tasm3.pp
  2. 2 13
      tests/webtbs/tw10641.pp

+ 1 - 0
tests/test/tasm3.pp

@@ -1,4 +1,5 @@
 { %CPU=x86_64 }
+{ %opt=-vw -Sew }
 
 // Basic test for 3-operand SIMD instructions with rip-relative operand
 

+ 2 - 13
tests/webtbs/tw10641.pp

@@ -1,4 +1,6 @@
 { %cpu=x86_64 }
+{ %opt=-vw -Sew }
+
 {$ifdef windows}
   {$imagebase $10000}
 {$endif}
@@ -10,29 +12,16 @@ begin
   test2:=$deadbeef;
   ASM
     MOVL $16,%EAX
-{$ifdef FPC_PIC}
     LEA .LLT(%RIP),%RBX
     JMP (%RBX,%RAX)
-{$else not FPC_PIC}
-    JMP .LLT(%RAX)
-{$endif not FPC_PIC}
     .balign 16
 .LLT:
     .quad .L3,.L2,.L1
 .L2:
-{$ifdef FPC_PIC}
     MOVL $12341234,test2(%RIP)
-    JMP  .L3(%RIP)
-{$else not FPC_PIC}
-    MOVL $12341234,test2
     JMP  .L3
-{$endif not FPC_PIC}
 .L1:
-{$ifdef FPC_PIC}
     MOVL $0,test(%RIP)
-{$else not FPC_PIC}
-    MOVL $0,test
-{$endif not FPC_PIC}
 .L3:
   END;
   if (test<>0) or (test2<>$deadbeef) then