|
@@ -34,30 +34,8 @@ asm
|
|
|
cmpq $-4095, %rax { Check %rax for error. }
|
|
|
jnae .LSyscOK { Jump to error handler if error. }
|
|
|
negq %rax
|
|
|
- movq %rax,%rdx
|
|
|
-{$ifdef FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
|
|
|
- movq (%rax),%rax
|
|
|
-{$ifndef FPC_STATICRIPFIXED}
|
|
|
- movq Errno@GOTPCREL(%rip),%r11
|
|
|
-{$else}
|
|
|
- leaq Errno(%rip),%r11
|
|
|
-{$endif}
|
|
|
-{$else FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc,%rax
|
|
|
- leaq Errno,%r11
|
|
|
-{$endif FPC_PIC}
|
|
|
- testq %rax,%rax
|
|
|
- jne .LThread
|
|
|
- movl %edx,8(%r11)
|
|
|
- jmp .LNoThread
|
|
|
-.LThread:
|
|
|
- pushq %rdx
|
|
|
- movq (%r11),%rdi
|
|
|
- call *%rax
|
|
|
- popq %rdx
|
|
|
- movl %edx,(%rax)
|
|
|
-.LNoThread:
|
|
|
+ movq %rax,%rdi
|
|
|
+ call seterrno
|
|
|
movq $-1,%rax
|
|
|
.LSyscOK:
|
|
|
end;
|
|
@@ -78,30 +56,8 @@ asm
|
|
|
cmpq $-4095, %rax { Check %rax for error. }
|
|
|
jnae .LSyscOK { Jump to error handler if error. }
|
|
|
negq %rax
|
|
|
- movq %rax,%rdx
|
|
|
-{$ifdef FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
|
|
|
- movq (%rax),%rax
|
|
|
-{$ifndef FPC_STATICRIPFIXED}
|
|
|
- movq Errno@GOTPCREL(%rip),%r11
|
|
|
-{$else}
|
|
|
- leaq Errno(%rip),%r11
|
|
|
-{$endif}
|
|
|
-{$else FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc,%rax
|
|
|
- leaq Errno,%r11
|
|
|
-{$endif FPC_PIC}
|
|
|
- testq %rax,%rax
|
|
|
- jne .LThread
|
|
|
- movl %edx,8(%r11)
|
|
|
- jmp .LNoThread
|
|
|
-.LThread:
|
|
|
- pushq %rdx
|
|
|
- movq (%r11),%rdi
|
|
|
- call *%rax
|
|
|
- popq %rdx
|
|
|
- movl %edx,(%rax)
|
|
|
-.LNoThread:
|
|
|
+ movq %rax,%rdi
|
|
|
+ call seterrno
|
|
|
movq $-1,%rax
|
|
|
.LSyscOK:
|
|
|
end;
|
|
@@ -125,30 +81,8 @@ asm
|
|
|
cmpq $-4095, %rax { Check %rax for error. }
|
|
|
jnae .LSyscOK { Jump to error handler if error. }
|
|
|
negq %rax
|
|
|
- movq %rax,%rdx
|
|
|
-{$ifdef FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
|
|
|
- movq (%rax),%rax
|
|
|
-{$ifndef FPC_STATICRIPFIXED}
|
|
|
- movq Errno@GOTPCREL(%rip),%r11
|
|
|
-{$else}
|
|
|
- leaq Errno(%rip),%r11
|
|
|
-{$endif}
|
|
|
-{$else FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc,%rax
|
|
|
- leaq Errno,%r11
|
|
|
-{$endif FPC_PIC}
|
|
|
- testq %rax,%rax
|
|
|
- jne .LThread
|
|
|
- movl %edx,8(%r11)
|
|
|
- jmp .LNoThread
|
|
|
-.LThread:
|
|
|
- pushq %rdx
|
|
|
- movq (%r11),%rdi
|
|
|
- call *%rax
|
|
|
- popq %rdx
|
|
|
- movl %edx,(%rax)
|
|
|
-.LNoThread:
|
|
|
+ movq %rax,%rdi
|
|
|
+ call seterrno
|
|
|
movq $-1,%rax
|
|
|
.LSyscOK:
|
|
|
end;
|
|
@@ -175,30 +109,8 @@ asm
|
|
|
cmpq $-4095, %rax { Check %rax for error. }
|
|
|
jnae .LSyscOK { Jump to error handler if error. }
|
|
|
negq %rax
|
|
|
- movq %rax,%rdx
|
|
|
-{$ifdef FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
|
|
|
- movq (%rax),%rax
|
|
|
-{$ifndef FPC_STATICRIPFIXED}
|
|
|
- movq Errno@GOTPCREL(%rip),%r11
|
|
|
-{$else}
|
|
|
- leaq Errno(%rip),%r11
|
|
|
-{$endif}
|
|
|
-{$else FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc,%rax
|
|
|
- leaq Errno,%r11
|
|
|
-{$endif FPC_PIC}
|
|
|
- testq %rax,%rax
|
|
|
- jne .LThread
|
|
|
- movl %edx,8(%r11)
|
|
|
- jmp .LNoThread
|
|
|
-.LThread:
|
|
|
- pushq %rdx
|
|
|
- movq (%r11),%rdi
|
|
|
- call *%rax
|
|
|
- popq %rdx
|
|
|
- movl %edx,(%rax)
|
|
|
-.LNoThread:
|
|
|
+ movq %rax,%rdi
|
|
|
+ call seterrno
|
|
|
movq $-1,%rax
|
|
|
.LSyscOK:
|
|
|
end;
|
|
@@ -228,30 +140,8 @@ asm
|
|
|
cmpq $-4095, %rax { Check %rax for error. }
|
|
|
jnae .LSyscOK { Jump to error handler if error. }
|
|
|
negq %rax
|
|
|
- movq %rax,%rdx
|
|
|
-{$ifdef FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
|
|
|
- movq (%rax),%rax
|
|
|
-{$ifndef FPC_STATICRIPFIXED}
|
|
|
- movq Errno@GOTPCREL(%rip),%r11
|
|
|
-{$else}
|
|
|
- leaq Errno(%rip),%r11
|
|
|
-{$endif}
|
|
|
-{$else FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc,%rax
|
|
|
- leaq Errno,%r11
|
|
|
-{$endif FPC_PIC}
|
|
|
- testq %rax,%rax
|
|
|
- jne .LThread
|
|
|
- movl %edx,8(%r11)
|
|
|
- jmp .LNoThread
|
|
|
-.LThread:
|
|
|
- pushq %rdx
|
|
|
- movq (%r11),%rdi
|
|
|
- call *%rax
|
|
|
- popq %rdx
|
|
|
- movl %edx,(%rax)
|
|
|
-.LNoThread:
|
|
|
+ movq %rax,%rdi
|
|
|
+ call seterrno
|
|
|
movq $-1,%rax
|
|
|
.LSyscOK:
|
|
|
end;
|
|
@@ -284,30 +174,8 @@ asm
|
|
|
cmpq $-4095, %rax { Check %rax for error. }
|
|
|
jnae .LSyscOK { Jump to error handler if error. }
|
|
|
negq %rax
|
|
|
- movq %rax,%rdx
|
|
|
-{$ifdef FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
|
|
|
- movq (%rax),%rax
|
|
|
-{$ifndef FPC_STATICRIPFIXED}
|
|
|
- movq Errno@GOTPCREL(%rip),%r11
|
|
|
-{$else}
|
|
|
- leaq Errno(%rip),%r11
|
|
|
-{$endif}
|
|
|
-{$else FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc,%rax
|
|
|
- leaq Errno,%r11
|
|
|
-{$endif FPC_PIC}
|
|
|
- testq %rax,%rax
|
|
|
- jne .LThread
|
|
|
- movl %edx,8(%r11)
|
|
|
- jmp .LNoThread
|
|
|
-.LThread:
|
|
|
- pushq %rdx
|
|
|
- movq (%r11),%rdi
|
|
|
- call *%rax
|
|
|
- popq %rdx
|
|
|
- movl %edx,(%rax)
|
|
|
-.LNoThread:
|
|
|
+ movq %rax,%rdi
|
|
|
+ call seterrno
|
|
|
movq $-1,%rax
|
|
|
.LSyscOK:
|
|
|
end;
|
|
@@ -344,30 +212,8 @@ asm
|
|
|
cmpq $-4095, %rax { Check %rax for error. }
|
|
|
jnae .LSyscOK { Jump to error handler if error. }
|
|
|
negq %rax
|
|
|
- movq %rax,%rdx
|
|
|
-{$ifdef FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc@GOTPCREL(%rip),%rax
|
|
|
- movq (%rax),%rax
|
|
|
-{$ifndef FPC_STATICRIPFIXED}
|
|
|
- movq Errno@GOTPCREL(%rip),%r11
|
|
|
-{$else}
|
|
|
- leaq Errno(%rip),%r11
|
|
|
-{$endif}
|
|
|
-{$else FPC_PIC}
|
|
|
- movq fpc_threadvar_relocate_proc,%rax
|
|
|
- leaq Errno,%r11
|
|
|
-{$endif FPC_PIC}
|
|
|
- testq %rax,%rax
|
|
|
- jne .LThread
|
|
|
- movl %edx,8(%r11)
|
|
|
- jmp .LNoThread
|
|
|
-.LThread:
|
|
|
- pushq %rdx
|
|
|
- movq (%r11),%rdi
|
|
|
- call *%rax
|
|
|
- popq %rdx
|
|
|
- movl %edx,(%rax)
|
|
|
-.LNoThread:
|
|
|
+ movq %rax,%rdi
|
|
|
+ call seterrno
|
|
|
movq $-1,%rax
|
|
|
.LSyscOK:
|
|
|
end;
|