[fpc-devel] building ppcrossavr, internal error 200309041

Georg Hieber georg at ghgrp.com
Fri Apr 10 15:56:23 CEST 2015


As long as this remains an issue in 64bit - operations it is of little 
relevance for an 8bit microcontroller that spends most of it's life 
shuffling bytes and words. I would not put too much effort into that, at 
least not if a real solution, i.e. rewriting the related parts of the 
register allocator is somewhere in the pipeline.

There is another phenomenon (that actually might be just another side of 
the same coin) that bothers me more and that I call "detours": a 
calculation result is first copied to a second register (and maybe even 
a third) before finally stored at it's final destination, memory or 
function result. This is not broken code, but it unnecessarily increases 
both code size and execution time. I have seen that in one of your last 
fixes you already changed something in that respect ("remove useless mov 
instructions"). I will try to reproduce my former observations with the 
latest version, and if this issue persits, report.

Am 10.04.2015 um 05:09 schrieb Florian Klämpfl:
> Am 10.04.2015 um 04:10 schrieb Georg Hieber:
>> In build 30522 I think I observed a variant of the problem:
>>
>> The make cycle aborts again when crosscompiling system.pp with the error message:
>>
>> sstrings.inc(1268,3) Error: Local variables size exceeds supported limit
>> sstrings.inc(1261,18) Fatal: Procedure too complex, it requires too many registers
>>
>> First there was the Internal error 200309041 in generic.inc, line 1917, which I "fixed" by putting
>> the procedure in {$ifndef CPUavr} .. {$endif} block, after that occurred  the above. I "fixed" this
>> the same way, and the rtl compiles.
>>
>> Please confirm if that is the same issue, or something new.
> Yes, this is the same issue.
>
>> For the time being, I won't file a bug report, as you say it does not make much sense. I will,
>> however, keep track of the behaviour, and if one day I see a certain pattern, I will document it.
> The pattern is simple: procedures with high register pressure calling procedure taking a lot of
> parameters in combination with code which generates instructions working with constants.
>
> I am currently working on improving the avr cg so it wastes less registers, this might help. Though
> it does not solve the problem but it only hides it.
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel




More information about the fpc-devel mailing list