Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Reinier Olislagers
Applied a similar patch [1]; progress, thanks! gdb bt now shows: ^C Program received signal SIGINT, Interrupt. fpc_setjmp (S= {RA = 4398704, SP = 2139211400, S0 = 2130823600, S1 = 5034972, S2 = 5035028, S3 = 4571000, S4 = 2000557128, S5 = 4587520, S6 = 4589204, S7 = 5034940, FP =

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Sergei Gorelkin
09.09.2014 9:53, Sven Barth пишет: On 08.09.2014 22:54, Michael Ring wrote: This smells like a problem I had on pic32. In my case the pic32 chips do not have a floating point unit and the processor creates an illegal instruction (or something similar) exception. I solved this for me by

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Mark Morgan Lloyd
Sven Barth wrote: On 08.09.2014 22:54, Michael Ring wrote: This smells like a problem I had on pic32. In my case the pic32 chips do not have a floating point unit and the processor creates an illegal instruction (or something similar) exception. I solved this for me by patching out the call to

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Tomas Hajny
On Tue, September 9, 2014 10:20, Mark Morgan Lloyd wrote: . . I was wondering whether a completely empty program would be a better test than a Hello, World!. Could a completely empty program be recognised by the compiler etc. as a special case and built with only minimal RTL initialisation,

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Sven Barth
Am 09.09.2014 08:53 schrieb Sergei Gorelkin sergei_gorel...@mail.ru: 09.09.2014 9:53, Sven Barth пишет: On 08.09.2014 22:54, Michael Ring wrote: This smells like a problem I had on pic32. In my case the pic32 chips do not have a floating point unit and the processor creates an illegal

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Sven Barth
Am 09.09.2014 10:30 schrieb Mark Morgan Lloyd markmll.fpc-de...@telemetry.co.uk: Sven Barth wrote: On 08.09.2014 22:54, Michael Ring wrote: This smells like a problem I had on pic32. In my case the pic32 chips do not have a floating point unit and the processor creates an illegal

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Sergei Gorelkin
09.09.2014 13:19, Sven Barth пишет: Am 09.09.2014 08:53 schrieb Sergei Gorelkin sergei_gorel...@mail.ru mailto:sergei_gorel...@mail.ru: 09.09.2014 9:53, Sven Barth пишет: On 08.09.2014 22:54, Michael Ring wrote: This smells like a problem I had on pic32. In my case the pic32 chips do

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Mark Morgan Lloyd
Tomas Hajny wrote: On Tue, September 9, 2014 10:20, Mark Morgan Lloyd wrote: . . I was wondering whether a completely empty program would be a better test than a Hello, World!. Could a completely empty program be recognised by the compiler etc. as a special case and built with only minimal

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Michael Ring
This problem also looks similar, there are two procedures in setjump.inc and they both address the fpu: ctc1 $v0,$31 cfc1 $v0,$31 Michael Am 09.09.14 um 08:29 schrieb Reinier Olislagers: Applied a similar patch [1]; progress, thanks! gdb bt now shows: ^C Program received signal

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Michael Ring
Sergei, I have reworked the patch based on your comment: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revisionrevision=28634 Do you think this is solved better now? Michael Am 09.09.14 um 08:52 schrieb Sergei Gorelkin: 09.09.2014 9:53, Sven Barth пишет: On 08.09.2014 22:54, Michael

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Reinier Olislagers
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

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Tomas Hajny
On Tue, September 9, 2014 12:00, Mark Morgan Lloyd wrote: Tomas Hajny wrote: On Tue, September 9, 2014 10:20, Mark Morgan Lloyd wrote: . . I was wondering whether a completely empty program would be a better test than a Hello, World!. Could a completely empty program be recognised by the

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: In addition, what is the supposed difference between an empty program and program built with only minimal RTL initialisation? I don't see why something like this program test; begin end. should use anything other than the absolute

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Mark Morgan Lloyd
Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: In addition, what is the supposed difference between an empty program and program built with only minimal RTL initialisation? I don't see why something like this program test; begin end. should use anything other than

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Sergei Gorelkin
09.09.2014 14:33, Michael Ring пишет: Sergei, I have reworked the patch based on your comment: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revisionrevision=28634 Do you think this is solved better now? No, my point was that routines SysInitFPU and SysResetFPU from inc/generic.inc must

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: Your observation reduces to letting the compiler figuring out that in the system unit initialization the FPU Initialization can be safely skipped, and that possible state (like the FPU control word) is not important. This is nearly

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Sven Barth
Am 09.09.2014 11:19 schrieb Sven Barth pascaldra...@googlemail.com: Am 09.09.2014 08:53 schrieb Sergei Gorelkin sergei_gorel...@mail.ru: I also wonder what is the correct way to generate code that calls softfpu: 1) -SfSOFTFPU 2) -CfSOFT 3) -Ce ? I only know -CfSOFT and that is what I