------- Additional Comments From schlie at comcast dot net 2005-01-25 23:19 ------- (In reply to comment #11) > The change described above should avoid AVR keeping HImode integer constants > in registers and then copying them when required (its as cheap to load an > immediate constant as it is to copy registers, but the later increases > register > pressure, stack frame size, etc...)
Just as a minor clarification, HI-mode register-to-register moves are relativly cheap on avr (i.e. 1-instruction/1-cycle if allocated in an register pair), so there may often be circumstances when keeping frequently-recently used HI constants in registers may actually be cheaper than loading them upon demand (as QI-mode constant loads are limited to r16-r31), and although an HI-mode constant may be arbitrarity loaded from data-memory, they would need to have been stored there first in anticipation of their requirement, unfortunatly further complecated by data-memory itself tending to be a very scarce/limited resource (nor is it clear how to best express this potential method or cost to GCC if considered worth while)? (however, more accurrately describing true inst. costs should only help improve code effeciency) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19597