Browse Source

* regcall fix for threadvar

peter 21 năm trước cách đây
mục cha
commit
30780f5859
1 tập tin đã thay đổi với 95 bổ sung8 xóa
  1. 95 8
      rtl/linux/i386/syscall.inc

+ 95 - 8
rtl/linux/i386/syscall.inc

@@ -30,6 +30,17 @@ asm
   negl  %eax
 {$ifdef VER1_0}
   movl  %eax,Errno
+{$else}
+{$ifdef REGCALL}
+  movl  fpc_threadvar_relocate_proc,%ecx
+  testl %ecx,%ecx
+  jne   .LThread
+  movl  %eax,Errno+4
+.LThread:
+  movl  %eax,%ebx
+  call  *%ecx
+  movl  %ebx,(%eax)
+.LNoThread:
 {$else}
   movl  %eax,%edx
   movl  fpc_threadvar_relocate_proc,%eax
@@ -44,7 +55,8 @@ asm
   popl  %edx
   movl  %edx,(%eax)
 .LNoThread:
-{$endif}
+{$endif REGCALL}
+{$endif ver1_0}
   movl  $-1,%eax
 .LSyscOK:
 end;
@@ -61,6 +73,17 @@ asm
   negl  %eax
 {$ifdef VER1_0}
   movl  %eax,Errno
+{$else}
+{$ifdef REGCALL}
+  movl  fpc_threadvar_relocate_proc,%ecx
+  testl %ecx,%ecx
+  jne   .LThread
+  movl  %eax,Errno+4
+.LThread:
+  movl  %eax,%ebx
+  call  *%ecx
+  movl  %ebx,(%eax)
+.LNoThread:
 {$else}
   movl  %eax,%edx
   movl  fpc_threadvar_relocate_proc,%eax
@@ -75,7 +98,8 @@ asm
   popl  %edx
   movl  %edx,(%eax)
 .LNoThread:
-{$endif}
+{$endif REGCALL}
+{$endif ver1_0}
   movl  $-1,%eax
 .LSyscOK:
 end;
@@ -93,6 +117,17 @@ asm
   negl  %eax
 {$ifdef VER1_0}
   movl  %eax,Errno
+{$else}
+{$ifdef REGCALL}
+  movl  fpc_threadvar_relocate_proc,%ecx
+  testl %ecx,%ecx
+  jne   .LThread
+  movl  %eax,Errno+4
+.LThread:
+  movl  %eax,%ebx
+  call  *%ecx
+  movl  %ebx,(%eax)
+.LNoThread:
 {$else}
   movl  %eax,%edx
   movl  fpc_threadvar_relocate_proc,%eax
@@ -107,7 +142,8 @@ asm
   popl  %edx
   movl  %edx,(%eax)
 .LNoThread:
-{$endif}
+{$endif REGCALL}
+{$endif ver1_0}
   movl  $-1,%eax
 .LSyscOK:
 end;
@@ -126,6 +162,17 @@ asm
   negl  %eax
 {$ifdef VER1_0}
   movl  %eax,Errno
+{$else}
+{$ifdef REGCALL}
+  movl  fpc_threadvar_relocate_proc,%ecx
+  testl %ecx,%ecx
+  jne   .LThread
+  movl  %eax,Errno+4
+.LThread:
+  movl  %eax,%ebx
+  call  *%ecx
+  movl  %ebx,(%eax)
+.LNoThread:
 {$else}
   movl  %eax,%edx
   movl  fpc_threadvar_relocate_proc,%eax
@@ -140,7 +187,8 @@ asm
   popl  %edx
   movl  %edx,(%eax)
 .LNoThread:
-{$endif}
+{$endif REGCALL}
+{$endif ver1_0}
   movl  $-1,%eax
 .LSyscOK:
 end;
@@ -160,6 +208,17 @@ asm
   negl  %eax
 {$ifdef VER1_0}
   movl  %eax,Errno
+{$else}
+{$ifdef REGCALL}
+  movl  fpc_threadvar_relocate_proc,%ecx
+  testl %ecx,%ecx
+  jne   .LThread
+  movl  %eax,Errno+4
+.LThread:
+  movl  %eax,%ebx
+  call  *%ecx
+  movl  %ebx,(%eax)
+.LNoThread:
 {$else}
   movl  %eax,%edx
   movl  fpc_threadvar_relocate_proc,%eax
@@ -174,7 +233,8 @@ asm
   popl  %edx
   movl  %edx,(%eax)
 .LNoThread:
-{$endif}
+{$endif REGCALL}
+{$endif ver1_0}
   movl  $-1,%eax
 .LSyscOK:
 end;
@@ -195,6 +255,17 @@ asm
   negl  %eax
 {$ifdef VER1_0}
   movl  %eax,Errno
+{$else}
+{$ifdef REGCALL}
+  movl  fpc_threadvar_relocate_proc,%ecx
+  testl %ecx,%ecx
+  jne   .LThread
+  movl  %eax,Errno+4
+.LThread:
+  movl  %eax,%ebx
+  call  *%ecx
+  movl  %ebx,(%eax)
+.LNoThread:
 {$else}
   movl  %eax,%edx
   movl  fpc_threadvar_relocate_proc,%eax
@@ -209,7 +280,8 @@ asm
   popl  %edx
   movl  %edx,(%eax)
 .LNoThread:
-{$endif}
+{$endif REGCALL}
+{$endif ver1_0}
   movl  $-1,%eax
 .LSyscOK:
 end;
@@ -232,6 +304,17 @@ asm
   negl  %eax
 {$ifdef VER1_0}
   movl  %eax,Errno
+{$else}
+{$ifdef REGCALL}
+  movl  fpc_threadvar_relocate_proc,%ecx
+  testl %ecx,%ecx
+  jne   .LThread
+  movl  %eax,Errno+4
+.LThread:
+  movl  %eax,%ebx
+  call  *%ecx
+  movl  %ebx,(%eax)
+.LNoThread:
 {$else}
   movl  %eax,%edx
   movl  fpc_threadvar_relocate_proc,%eax
@@ -246,7 +329,8 @@ asm
   popl  %edx
   movl  %edx,(%eax)
 .LNoThread:
-{$endif}
+{$endif REGCALL}
+{$endif ver1_0}
   movl  $-1,%eax
 .LSyscOK:
 end;
@@ -260,7 +344,10 @@ end;
 
 {
   $Log$
-  Revision 1.11  2004-02-06 23:06:16  florian
+  Revision 1.12  2004-03-03 22:03:10  peter
+    * regcall fix for threadvar
+
+  Revision 1.11  2004/02/06 23:06:16  florian
     - killed tsyscallregs
 
   Revision 1.10  2004/01/06 21:32:53  peter