Commit Graph

15 Commits

Author SHA1 Message Date
florian
bce88f2e2b * AVR: trgcpu.do_spill_read must load ofs 2022-05-05 19:35:38 +02:00
florian
0ae45bd2cf + AVR: track flag usage
+ AVR: take care of allocated flags when spilling
  * AVR: trgcpu.do_spill_read might also use ADIW
2022-05-01 22:42:57 +02:00
florian
038230bbea * AVR: use adiw to create spilling constants if possible
* AVR: insert allocations for registers used by spilling so the assembler optimizer does not remove spilling code
2022-05-01 22:42:57 +02:00
yury
64c586b86d * Removed/ifdefed lots of unused variables.
git-svn-id: trunk@48384 -
2021-01-24 12:24:01 +00:00
florian
2d9cdab264 + AVR: initial support for the avrtiny architecture
git-svn-id: trunk@43987 -
2020-01-19 15:55:24 +00:00
Jeppe Johansen
0d97dc7965 avr: Fixed some inconsistencies.
git-svn-id: trunk@42204 -
2019-06-10 13:35:38 +00:00
Jonas Maebe
4686f61002 * keep track of the temp position separately from the offset in references,
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 -
2018-04-22 17:03:16 +00:00
nickysn
ddba821561 * GetNextReg(), used by 16-bit and 8-bit code generators (i8086 and avr) moved
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 -
2017-09-11 14:53:06 +00:00
Jonas Maebe
a25ebbba3e + added volatility information to all memory references
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 -
2016-11-27 18:17:37 +00:00
florian
cf58a7ad60 * cosmetics
git-svn-id: trunk@30595 -
2015-04-14 20:47:26 +00:00
florian
315d7d9725 + do_spill_replace for avr
git-svn-id: trunk@30535 -
2015-04-10 22:14:36 +00:00
Jonas Maebe
5ef93e85b8 + added extra "orgsupreg" parameter to do_spill_read/do_spill_written/
do_spill_replace routines, will be necessary by llvm register
    allocator to determine the tdef corresponding to that register
  * replaced uses of taicpu with tai_cpu_abstract_sym in the register
    allocator so that it can work both with taicpu and taillvm instructions

git-svn-id: branches/hlcgllvm@26043 -
2013-11-11 11:15:43 +00:00
florian
53ee505d84 * fixed spilling
* fixed register assignment for instructions requiring a register>R15

git-svn-id: branches/avr@17046 -
2011-02-27 21:10:31 +00:00
florian
07182fba98 * continued work on avr-embedded
git-svn-id: trunk@11575 -
2008-08-14 14:23:25 +00:00
florian
bc73f9021c Merged revisions 5891-10167,10169-10180 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/avr

........
  r5891 | florian | 2007-01-11 17:30:12 +0100 (Do, 11 Jan 2007) | 2 lines
  
  + some initial work
........
  r10170 | florian | 2008-02-03 11:02:04 +0100 (So, 03 Feb 2008) | 2 lines
  
  * continued to work on avr port
........
  r10180 | florian | 2008-02-03 15:29:30 +0100 (So, 03 Feb 2008) | 2 lines
  
  + a lot of skeleton code for avr added
........

git-svn-id: trunk@10186 -
2008-02-03 17:21:52 +00:00