[fpc-devel] MIPS big-endian program starts but does nothing
Reinier Olislagers
reinierolislagers at gmail.com
Tue Sep 9 12:35:44 CEST 2014
On 09/09/2014 12:08, Michael Ring wrote:
> This problem also looks similar, there are two procedures in setjump.inc
> and they both address the fpu:
Thanks.
Patched [1] setjump.inc and now get
#0 fpc_setjmp (S=
{RA = 4398696, SP = 2143770920, S0 = 2135383120, S1 = 12489692, S2
= 12489748, S3 = 4571000, S4 = 1997669448, S5 = 4587520, S6 = 4589204,
S7 = 12489660, FP = 2143771152, GP = 4589248, _FCSR = 2143771044, F20 =
0, F21 = 0, F22 = 0, F23 = 0, F24 = 0, F25 = 0, F26 = 4563928, F27 = 4,
F28 = 4563928, F29 = 4563931, F30 = 0, F31 = 0}) at
C:/development/fpctrunk/rtl/mips/setjump.inc:74
#1 0x00431e68 in ASSIGN (T=
{HANDLE = 0, MODE = 0, RECSIZE = 0, _PRIVATE = #0 <repeats 31
times>, USERDATA = #0 <repeats 31 times>, NAME = #0 <repeats 255
times>}, S=Cannot access memory at address 0xd7b1
)
at C:/development/fpctrunk/rtl/inc/text.inc:127
Line 74 in my patched setjump.inc and further:
swc1 $f20,jmp_buf.f20($a0)
swc1 $f21,jmp_buf.f21($a0)
swc1 $f22,jmp_buf.f22($a0)
swc1 $f23,jmp_buf.f23($a0)
swc1 $f24,jmp_buf.f24($a0)
swc1 $f25,jmp_buf.f25($a0)
swc1 $f26,jmp_buf.f26($a0)
swc1 $f27,jmp_buf.f27($a0)
swc1 $f28,jmp_buf.f28($a0)
swc1 $f29,jmp_buf.f29($a0)
swc1 $f30,jmp_buf.f30($a0)
swc1 $f31,jmp_buf.f31($a0)
move $v0,$zero
end;
[1]
Index: rtl/mips/setjump.inc
===================================================================
--- rtl/mips/setjump.inc (revision 28633)
+++ rtl/mips/setjump.inc (working copy)
@@ -28,7 +28,9 @@
lw $fp,jmp_buf.fp($a0)
lw $gp,jmp_buf.gp($a0)
lw $v0,jmp_buf._fcsr($a0)
+{$ifndef FPC_HAS_FEATURE_SOFTFPU}
ctc1 $v0,$31
+{$endif}
lwc1 $f20,jmp_buf.f20($a0)
lwc1 $f21,jmp_buf.f21($a0)
lwc1 $f22,jmp_buf.f22($a0)
@@ -65,7 +67,9 @@
sw $s7,jmp_buf.s7($a0)
sw $fp,jmp_buf.fp($a0)
sw $gp,jmp_buf.gp($a0)
+{$ifndef FPC_HAS_FEATURE_SOFTFPU}
cfc1 $v0,$31
+{$endif}
sw $v0,jmp_buf._fcsr($a0)
swc1 $f20,jmp_buf.f20($a0)
swc1 $f21,jmp_buf.f21($a0)
More information about the fpc-devel
mailing list