Curtis Hamilton 1 месяц назад
Родитель
Сommit
c5a0a0daa2
1 измененных файлов с 14 добавлено и 54 удалено
  1. 14 54
      rtl/bsd/powerpc64/syscall.inc

+ 14 - 54
rtl/bsd/powerpc64/syscall.inc

@@ -221,6 +221,11 @@ function FpSysCall(sysnr,param1,param2,param3,param4,param5,param6,param7:TSysPa
   This function puts the registers in place, does the call, and then
   This function puts the registers in place, does the call, and then
   copies back the registers as they are after the SysCall.
   copies back the registers as they are after the SysCall.
 }
 }
+var
+  { workaround for incomplete linkage area reservation by FPC 3.0.0 and earlier,
+    remove after 3.0.2 is the minimum bootstrap version }
+  dummy: array[1..4] of ptruint;
+  retaddress: ptruint;
 asm
 asm
   mr  r0,r3
   mr  r0,r3
   mr  r3,r4
   mr  r3,r4
@@ -231,61 +236,16 @@ asm
   mr  r8,r9
   mr  r8,r9
   mr  r9,r10
   mr  r9,r10
   sc
   sc
-  bnslr
-  lis   r4,Errno@ha
-  stw   r3,Errno@l(r4)
-  li    r3,-1
-  li    r4,-1
-end;
-
-function FpSysCall(sysnr,param1,param2,param3,param4,param5,param6,param7,param8:TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL8'];
-{
-  This function puts the registers in place, does the call, and then
-  copies back the registers as they are after the SysCall.
-}
-asm
-  mr  r0,r3
-  mr  r3,r4
-  mr  r4,r5
-  mr  r5,r6
-  mr  r6,r7
-  mr  r7,r8
-  mr  r8,r9
-  mr  r9,r10
-  mr  r10,r11
-  sc
-  bnslr
-  lis   r4,Errno@ha
-  stw   r3,Errno@l(r4)
-  li    r3,-1
-  li    r4,-1
-  li    r5,-1
-end;
-
-function FpSysCall(sysnr,param1,param2,param3,param4,param5,param6,param7,param8,param9:TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL9'];
-{
-  This function puts the registers in place, does the call, and then
-  copies back the registers as they are after the SysCall.
-}
-asm
-  mr  r0,r3
-  mr  r3,r4
-  mr  r4,r5
-  mr  r5,r6
-  mr  r6,r7
-  mr  r7,r8
-  mr  r8,r9
-  mr  r9,r10
-  mr  r10,r11
-  mr  r11,r12
-  sc
-  bnslr
-  lis   r4,Errno@ha
-  stw   r3,Errno@l(r4)
-  li    r3,-1
+  bns .LDone
+  mflr r4
+  std r4, retaddress
+  bl seterrno
   li    r4,-1
   li    r4,-1
-  li    r5,-1
-  li    r6,-1
+  nop
+  ld r4, retaddress
+  li r3, -1
+  mtlr r4
+.LDone
 end;
 end;