Thursday, 4 February 2021

Re: [gccsdk] long long parameter + module code + tail calls + -Os generates broken stack code

On 03/02/2021 09:49, Rob Kendrick wrote:
> I have a problem where if I change any of the four things mentioned in the
> subject (ie, use a 32 bit int, don't pass -mmodule, use -O0 or -O2, etc) it
> vanishes. With the combination, the code generated stacks every register in
> the preamble, but never unstacks them. gas also complains that the writeback
> register is in the list (with good reason!)
>
> Might be some sort of bitmap signedness problem somewhere in the code
> generator?
>
> (The actual function I identified this on is much longer. The only other
> simplification I could make and still produce the problem is to remove the
> final return statement, but that is included here.)

Unfortunately, I couldn't even get it to compile at all and got this
error:

*** buffer overflow detected ***: terminated
testcase.c: In function 'write_long':
testcase.c:7:1: internal compiler error: Aborted

Looking at your assembler output, I can see that the epilogue is
correct, and that the prologue should match it.
I will look in to it.

Thanks,
Lee.

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment