avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] string initialization using "" and { }


From: Jan Waclawek
Subject: Re: [avr-gcc-list] string initialization using "" and { }
Date: Thu, 28 May 2009 7:15:00 +0200

Joerg,

I am painfully aware of the consequence of avr-gcc sharing most of its codebase 
with a compiler primarily aimed at the "big" computers. IMHO it's a pity that 
the time and energy of volunteers did not went into the avr port of SDCC, which 
is maybe a more adequate, albeit certainly less mature, background for an 
mcu-specific compiler.

However, I still believe, that RFEs exist to bring everyday problems of mere 
users into the more competent developers' attention. Certainly an esoteric and 
complex problem is more attractive target for a volunteer work, but my hopes 
are, the volunteers want to see their effort also to bring fruit to others - 
who might then return ther share  perhaps in some other way.

To be specific, as 1-, 2- and 4-byte array initialisers are compiled in an 
optimal ldi/st way, and e.g. 3-bytes are not, I assume this is an optimisation 
performed in the avr-specific backend, to reduce the overhead when using 
initialised char-short-long. That's IMHO the place where a bit more work might 
bring benefit.

The string initialiser *might* be a different issue, I see that.

Jan Waclawek




-----Original Message-----

Note that this behaviour is only a pessimization if you've got a
target machine like an AVR.  For a hosted application on a
"mainstream" GCC target machine, this is not an optimization at all,
because setting up the data segment comes at virtually no cost there.

That might explain why an enhancement request like this one would very
likely not trigger much motivation on the average GCC developer.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL






reply via email to

[Prev in Thread] Current Thread [Next in Thread]