Pārlūkot izejas kodu

* change non-volatile rbx to volatile r11

git-svn-id: trunk@4013 -
peter 19 gadi atpakaļ
vecāks
revīzija
b32b872a7e
3 mainītis faili ar 52 papildinājumiem un 28 dzēšanām
  1. 1 0
      .gitattributes
  2. 28 28
      rtl/linux/x86_64/syscall.inc
  3. 23 0
      tests/webtbs/tw7104.pp

+ 1 - 0
.gitattributes

@@ -7194,6 +7194,7 @@ tests/webtbs/tw6977.pp svneol=native#text/plain
 tests/webtbs/tw6980.pp svneol=native#text/plain
 tests/webtbs/tw6989.pp svneol=native#text/plain
 tests/webtbs/tw7006.pp svneol=native#text/plain
+tests/webtbs/tw7104.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain

+ 28 - 28
rtl/linux/x86_64/syscall.inc

@@ -29,18 +29,18 @@ asm
 {$ifdef FPC_PIC}
   movq  fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
   movq  (%rax),%rax
-  movq  Errno@GOTPCREL(%rip),%rbx
+  movq  Errno@GOTPCREL(%rip),%r11
 {$else FPC_PIC}
   movq  fpc_threadvar_relocate_proc,%rax
-  leaq  Errno,%rbx
+  leaq  Errno,%r11
 {$endif FPC_PIC}
   testq %rax,%rax
   jne   .LThread
-  movl  %edx,8(%rbx)
+  movl  %edx,8(%r11)
   jmp   .LNoThread
 .LThread:
   pushq %rdx
-  movq  (%rbx),%rdi
+  movq  (%r11),%rdi
   call  *%rax
   popq  %rdx
   movl  %edx,(%rax)
@@ -62,18 +62,18 @@ asm
 {$ifdef FPC_PIC}
   movq  fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
   movq  (%rax),%rax
-  movq  Errno@GOTPCREL(%rip),%rbx
+  movq  Errno@GOTPCREL(%rip),%r11
 {$else FPC_PIC}
   movq  fpc_threadvar_relocate_proc,%rax
-  leaq  Errno,%rbx
+  leaq  Errno,%r11
 {$endif FPC_PIC}
   testq %rax,%rax
   jne   .LThread
-  movl  %edx,8(%rbx)
+  movl  %edx,8(%r11)
   jmp   .LNoThread
 .LThread:
   pushq %rdx
-  movq  (%rbx),%rdi
+  movq  (%r11),%rdi
   call  *%rax
   popq  %rdx
   movl  %edx,(%rax)
@@ -96,18 +96,18 @@ asm
 {$ifdef FPC_PIC}
   movq  fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
   movq  (%rax),%rax
-  movq  Errno@GOTPCREL(%rip),%rbx
+  movq  Errno@GOTPCREL(%rip),%r11
 {$else FPC_PIC}
   movq  fpc_threadvar_relocate_proc,%rax
-  leaq  Errno,%rbx
+  leaq  Errno,%r11
 {$endif FPC_PIC}
   testq %rax,%rax
   jne   .LThread
-  movl  %edx,8(%rbx)
+  movl  %edx,8(%r11)
   jmp   .LNoThread
 .LThread:
   pushq %rdx
-  movq  (%rbx),%rdi
+  movq  (%r11),%rdi
   call  *%rax
   popq  %rdx
   movl  %edx,(%rax)
@@ -131,18 +131,18 @@ asm
 {$ifdef FPC_PIC}
   movq  fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
   movq  (%rax),%rax
-  movq  Errno@GOTPCREL(%rip),%rbx
+  movq  Errno@GOTPCREL(%rip),%r11
 {$else FPC_PIC}
   movq  fpc_threadvar_relocate_proc,%rax
-  leaq  Errno,%rbx
+  leaq  Errno,%r11
 {$endif FPC_PIC}
   testq %rax,%rax
   jne   .LThread
-  movl  %edx,8(%rbx)
+  movl  %edx,8(%r11)
   jmp   .LNoThread
 .LThread:
   pushq %rdx
-  movq  (%rbx),%rdi
+  movq  (%r11),%rdi
   call  *%rax
   popq  %rdx
   movl  %edx,(%rax)
@@ -167,18 +167,18 @@ asm
 {$ifdef FPC_PIC}
   movq  fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
   movq  (%rax),%rax
-  movq  Errno@GOTPCREL(%rip),%rbx
+  movq  Errno@GOTPCREL(%rip),%r11
 {$else FPC_PIC}
   movq  fpc_threadvar_relocate_proc,%rax
-  leaq  Errno,%rbx
+  leaq  Errno,%r11
 {$endif FPC_PIC}
   testq %rax,%rax
   jne   .LThread
-  movl  %edx,8(%rbx)
+  movl  %edx,8(%r11)
   jmp   .LNoThread
 .LThread:
   pushq %rdx
-  movq  (%rbx),%rdi
+  movq  (%r11),%rdi
   call  *%rax
   popq  %rdx
   movl  %edx,(%rax)
@@ -204,18 +204,18 @@ asm
 {$ifdef FPC_PIC}
   movq  fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
   movq  (%rax),%rax
-  movq  Errno@GOTPCREL(%rip),%rbx
+  movq  Errno@GOTPCREL(%rip),%r11
 {$else FPC_PIC}
   movq  fpc_threadvar_relocate_proc,%rax
-  leaq  Errno,%rbx
+  leaq  Errno,%r11
 {$endif FPC_PIC}
   testq %rax,%rax
   jne   .LThread
-  movl  %edx,8(%rbx)
+  movl  %edx,8(%r11)
   jmp   .LNoThread
 .LThread:
   pushq %rdx
-  movq  (%rbx),%rdi
+  movq  (%r11),%rdi
   call  *%rax
   popq  %rdx
   movl  %edx,(%rax)
@@ -243,18 +243,18 @@ asm
 {$ifdef FPC_PIC}
   movq  fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
   movq  (%rax),%rax
-  movq  Errno@GOTPCREL(%rip),%rbx
+  movq  Errno@GOTPCREL(%rip),%r11
 {$else FPC_PIC}
   movq  fpc_threadvar_relocate_proc,%rax
-  leaq  Errno,%rbx
+  leaq  Errno,%r11
 {$endif FPC_PIC}
   testq %rax,%rax
   jne   .LThread
-  movl  %edx,8(%rbx)
+  movl  %edx,8(%r11)
   jmp   .LNoThread
 .LThread:
   pushq %rdx
-  movq  (%rbx),%rdi
+  movq  (%r11),%rdi
   call  *%rax
   popq  %rdx
   movl  %edx,(%rax)

+ 23 - 0
tests/webtbs/tw7104.pp

@@ -0,0 +1,23 @@
+program bug7104;
+
+{$mode objfpc}{$H+}
+
+Uses SysUtils;
+
+function count: integer;
+begin
+  result := 5;
+end;
+
+var
+  i: Integer;
+
+begin
+  for i := 0 to count-1 do begin
+    writeln(i);
+    if FileExists('asdkjasdjalsj') then;
+
+    if i>5 then halt(1);
+  end;
+end.
+