so that they can still be freed after the reference has been changed
(e.g. in case of array indexing or record field accesses) (mantis #33628)
git-svn-id: trunk@38814 -
from cpubase unit to a method in the tcg class. The reason for doing that is
that this is now a standard part of the 16-bit and 8-bit code generators and
moving to the tcg class allows doing extra checks (not done yet, but for
example, in the future, we can keep track of whether there was an extra
register allocated with getintregister and halt with an internalerror in case
GetNextReg() is called for registers, which weren't allocated as a part of a
sequence, therefore catching a certain class of 8-bit and 16-bit code
generator bugs at compile time, instead of generating wrong code).
- removed GetLastReg() from avr's cpubase unit, because it isn't used for
anything. It might be added to the tcg class, in case it's ever needed, but
for now I've left it out.
* GetOffsetReg() and GetOffsetReg64() were also moved to the tcg unit.
git-svn-id: trunk@37180 -
shiftcount>=size*8-1. This is commonly used by code, that extracts the sign
bit and improves code generation for signed division by power-of-2 as well.
This also fixes building avr-embedded (mantis #32241), which was caused by an
infinite loop in the register allocator, when regvars are enabled, due to too
much register pressure, when building charset.pp after r36842.
git-svn-id: trunk@36867 -
o separate information for reading and writing, because e.g. in a
try-block, only the writes to local variables and parameters are
volatile (they have to be committed immediately in case the next
instruction causes an exception)
o for now, only references to absolute memory addresses are marked
as volatile
o the volatily information is (should be) properly maintained throughout
all code generators for all archictures with this patch
o no optimizers or other compiler infrastructure uses the volatility
information yet
o this functionality is not (yet) exposed at the language level, it
is only for internal code generator use right now
git-svn-id: trunk@34996 -
it was AT_NONE, which is invalid and should never be used
* explicitly pass the correct value for all calls to those methods elsewhere
in the compiler
git-svn-id: trunk@34250 -
Updated the code for a_load_const_cgpara in case it needed stack parameters. This was completely broken before. Now it should allow things to compile at least.
git-svn-id: trunk@32086 -
Fixed multiplication code generation for AVR controllers without mul instructions.
Added handling of the old interrupt procedure directive such that procedures with that use RETI instead of RET.
git-svn-id: trunk@31030 -
* omit entry/exit code, if no frame pointer is used, partly fixes issue #27842
* take advantage of adiw/sbiw
* make more often use of ldd/std
git-svn-id: trunk@30732 -
* handle function result of FPC_MUL_WORD correctly
* use mov ...,r1 to load a register with zero instead of clr ..., this might enable the register allocator to
coalesce these moves in the feature
* use tst/dec instead of cpi/sub in the shifting loops, this reduces register pressure on r16 and higher
git-svn-id: trunk@30540 -