Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-14 Thread Bernd Mueller
Florian Klaempfl wrote: Does the ARM ABI require that the stack is aligned to 8 byte boundaries? Sorry, I don't know. Regards, Bernd. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-14 Thread Bernd Mueller
Micha Nelissen wrote: Bernd Mueller wrote: ok, it does not work. This is what I guessed. But I am in doubt about your current fix: asm bic r0,sp,#7 ldrd r0,[r0] end; r0 is double word (8 byte) aligned now, but does it always point to a valid memory location? IMHO something like t

Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-14 Thread Micha Nelissen
Bernd Mueller wrote: ok, it does not work. This is what I guessed. But I am in doubt about your current fix: asm bic r0,sp,#7 ldrd r0,[r0] end; r0 is double word (8 byte) aligned now, but does it always point to a valid memory location? IMHO something like that would be better:

Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-14 Thread Florian Klaempfl
Bernd Mueller schrieb: > Bernd Mueller wrote: >> >> You chose ldrd r0, [sp] to force the SIGILL on ARMv4. According to the >> docs the load address has to be double word (8 byte) aligned, >> otherwise a Bus Error/Misaligned data access Error on ARMv5 would >> occur. Is it save to use sp in your way

Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-14 Thread Bernd Mueller
Bernd Mueller wrote: You chose ldrd r0, [sp] to force the SIGILL on ARMv4. According to the docs the load address has to be double word (8 byte) aligned, otherwise a Bus Error/Misaligned data access Error on ARMv5 would occur. Is it save to use sp in your way? ok, it does not work. This is

Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-08 Thread Bernd Mueller
Florian Klaempfl wrote: I commited a fix in 10458. I tried to fix SignalToRunerror without assembler, maybe it works. yes it works, thanks. You chose ldrd r0, [sp] to force the SIGILL on ARMv4. According to the docs the load address has to be double word (8 byte) aligned, otherwise a Bus Er

Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-07 Thread Florian Klaempfl
Bernd Mueller schrieb: > Florian Klaempfl wrote: >> Bernd Mueller schrieb: >>> Florian Klaempfl wrote: CPUs supporting CLZ might not support PLD. Can you test if using ldrd works? >>> yes, ldrd works. >> >> Ok, my question was not very good ;) I meant, can we use ldrd, i.e. does >> ldrd c

Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-07 Thread Bernd Mueller
Florian Klaempfl wrote: Bernd Mueller schrieb: Florian Klaempfl wrote: CPUs supporting CLZ might not support PLD. Can you test if using ldrd works? yes, ldrd works. Ok, my question was not very good ;) I meant, can we use ldrd, i.e. does ldrd cause a sigill exception on ARMv4? :-) I unders

Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-07 Thread Florian Klaempfl
Bernd Mueller schrieb: > Florian Klaempfl wrote: >> CPUs supporting CLZ might not support PLD. Can you test if using ldrd >> works? > > yes, ldrd works. Ok, my question was not very good ;) I meant, can we use ldrd, i.e. does ldrd cause a sigill exception on ARMv4? ___

Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-07 Thread Bernd Mueller
Florian Klaempfl wrote: CPUs supporting CLZ might not support PLD. Can you test if using ldrd works? yes, ldrd works. Regards, Bernd. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-06 Thread Florian Klaempfl
Bernd Mueller schrieb: > Florian Klaempfl wrote: >> Bernd Mueller schrieb: >>> Hello, >>> >>> the ARMv5 runtime detection in rtl/arm/arm.inc fails, because the used >>> pld instruction does not raise SIGILL on ARM architectures ARMv4 and >>> below. If you would use an instruction which raises a SIG

Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-06 Thread Bernd Mueller
Florian Klaempfl wrote: Bernd Mueller schrieb: Hello, the ARMv5 runtime detection in rtl/arm/arm.inc fails, because the used pld instruction does not raise SIGILL on ARM architectures ARMv4 and below. If you would use an instruction which raises a SIGILL, it would still fail, because SignalToRu

Re: [fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-05 Thread Florian Klaempfl
Bernd Mueller schrieb: > Hello, > > the ARMv5 runtime detection in rtl/arm/arm.inc fails, because the used > pld instruction does not raise SIGILL on ARM architectures ARMv4 and > below. If you would use an instruction which raises a SIGILL, it would > still fail, because SignalToRunerror in rtl/l

[fpc-devel] ARM-Linux, ARMv5 runtime detection fails

2008-03-05 Thread Bernd Mueller
Hello, the ARMv5 runtime detection in rtl/arm/arm.inc fails, because the used pld instruction does not raise SIGILL on ARM architectures ARMv4 and below. If you would use an instruction which raises a SIGILL, it would still fail, because SignalToRunerror in rtl/linux/arm/sighnd.inc does not r