florian
aec49340a3
* patch by Christo Crause, resolves #38961 , fixes the following formatting and spelling problems in the AVR compiler files:
...
- Change spelling of AM_PREDRECEMENT to AM_PREDECREMENT
- Fix multiline comment style to use {}
- Fix indenting of code in method tcgavr.g_concatcopy
git-svn-id: trunk@49474 -
2021-06-04 20:16:25 +00:00
florian
9d6ceda532
* patch by Christo Crause: do not generate LDD for avrtiny, resolves #38958
...
git-svn-id: trunk@49473 -
2021-06-03 18:48:40 +00:00
florian
5e1e6c24a4
* patch by Christo Crause: handle references to absolute address 0 correctly, resolves #38861
...
git-svn-id: trunk@49344 -
2021-05-07 16:19:05 +00:00
yury
4fa99cff62
* Removed more assigned but unused vars.
...
git-svn-id: trunk@48392 -
2021-01-24 14:05:21 +00:00
yury
64c586b86d
* Removed/ifdefed lots of unused variables.
...
git-svn-id: trunk@48384 -
2021-01-24 12:24:01 +00:00
florian
fa54335938
* patch by Christo Crause to fix illegal ldd generation for avrtiny, resolves #37929
...
git-svn-id: trunk@47118 -
2020-10-16 20:01:40 +00:00
florian
637976e83f
* patch by Marģers to unify internal error numbers, resolves #37888
...
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +00:00
nickysn
599b7e80c0
* fix for OP_ROR in tcgavr.a_op_reg_reg_internal
...
git-svn-id: trunk@44749 -
2020-04-17 17:19:22 +00:00
florian
2135b9b724
* for avr1, do not save registers during an interrupt procedure, as it has no memory to store them
...
git-svn-id: trunk@44139 -
2020-02-09 14:35:56 +00:00
florian
640fe9c290
* actually, with lds/sts avrtiny can load addresses up to 191
...
git-svn-id: trunk@44104 -
2020-02-02 20:41:28 +00:00
florian
36058ca4d4
* based on a patch by Christo Crause: more compiler fixes for avrtiny, resolves #36646
...
git-svn-id: trunk@44103 -
2020-02-02 20:35:29 +00:00
florian
670c61e760
* patch by Christo Crause: support for megaAVR 0 and tinyAVR 0/1, #36616 , part 1/3
...
git-svn-id: trunk@44036 -
2020-01-26 14:35:26 +00:00
florian
429130fa34
* AVR: attiny can do post increment operations, so remove code working around this
...
git-svn-id: trunk@43996 -
2020-01-19 18:04:59 +00:00
florian
2d9cdab264
+ AVR: initial support for the avrtiny architecture
...
git-svn-id: trunk@43987 -
2020-01-19 15:55:24 +00:00
florian
f629fa1bb9
* AVR: tcgavr.normalize_ref must always load the reference into tmpreg
...
git-svn-id: trunk@43986 -
2020-01-19 15:55:23 +00:00
florian
26eae3672b
+ AVR: GetDefaultZeroReg and GetDefaultTmpReg
...
git-svn-id: trunk@43985 -
2020-01-19 15:55:23 +00:00
florian
96a4cda03b
* AVR: fixes pushing and handling of stack passed parameters
...
git-svn-id: trunk@43983 -
2020-01-19 15:55:21 +00:00
Jonas Maebe
1e3f72403e
* renamed getintparaloc to getcgtempparaloc
...
o it can be used for more than integer parameters
git-svn-id: trunk@43781 -
2019-12-24 22:12:25 +00:00
florian
701848889e
* avr: help the compiler with constant loading to avoid ie 200309041
...
git-svn-id: trunk@43350 -
2019-11-01 18:39:16 +00:00
florian
e8a48be3bc
* avr: more precise execution weigth for shift loops
...
git-svn-id: trunk@43349 -
2019-11-01 18:39:15 +00:00
florian
f61207f1cc
* avr directly encodes constant shifts of 64 bit values
...
git-svn-id: trunk@43348 -
2019-11-01 18:39:15 +00:00
florian
5fc12500f2
* patch by Christo Crause: fix for r43136
...
git-svn-id: trunk@43169 -
2019-10-12 11:52:06 +00:00
florian
dd2d1bf68b
* (modified/re-formatted) patch by Christo Crause: AVR: Optimizing code generation for shift with compile time constant
...
git-svn-id: trunk@43136 -
2019-10-05 20:48:33 +00:00
florian
4e93a9a6c7
* AVR: patch by Christo Crause: fixes tcgavr.g_concatcopy for data with size>255, resolves #36066
...
git-svn-id: trunk@42977 -
2019-09-12 20:29:12 +00:00
florian
9e5cbce6be
* fix tcgavr.g_flags2reg for sizes > 1 byte
...
git-svn-id: trunk@42938 -
2019-09-07 20:19:12 +00:00
Jeppe Johansen
1b698d319f
- Fix bug in software overflow checking for longint's.
...
- AVR: Fix overflow checking for HW multiplications
git-svn-id: trunk@42531 -
2019-07-30 13:42:26 +00:00
Jeppe Johansen
f72342ed0e
AVR: Add support for using nostackframe in interrupt routines.
...
git-svn-id: trunk@42519 -
2019-07-28 16:46:13 +00:00
Jeppe Johansen
91016c97a4
AVR: Add optimizations for sign testing, and a better Abs() implementation.
...
git-svn-id: trunk@42510 -
2019-07-28 11:16:37 +00:00
Jeppe Johansen
030cf78ac5
- Fix overflow checking for multiplication operations on AVR.
...
git-svn-id: trunk@42492 -
2019-07-25 13:16:12 +00:00
Jeppe Johansen
5bdc635f50
Check if the current register was the last in the cgpara, to avoid running over the last register allocated.
...
git-svn-id: trunk@42159 -
2019-06-02 09:13:19 +00:00
florian
8fceba4493
* properly allocate parameter registers for constants on avr, resolves #33932
...
git-svn-id: trunk@40848 -
2019-01-12 13:28:09 +00:00
florian
917de001d6
* patch (slighly modified) by Christo Crause to write 16 bit registers on avr in hi/lo order, resolves #34721
...
git-svn-id: trunk@40678 -
2018-12-27 21:41:36 +00:00
Jonas Maebe
0b246f3dbd
* converted Boolean8 to an internal type, and mapped Boolean to the
...
new internal pasbool1(type) (part of mantis #34411 )
o apply the _Bool x86-64 parameter passing rules only to pasbool1
git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
Jonas Maebe
d69ad8fa41
* removed temppos field again from parameter locations: they're not allocated
...
by the temp manager of the current procedure
git-svn-id: trunk@38858 -
2018-04-27 19:18:55 +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
florian
ee252d0ecd
+ allocate real registers properly in tcgavr
...
git-svn-id: trunk@38490 -
2018-03-10 21:53:52 +00:00
florian
3a81ccf48b
* simplify tcgavr.a_op_reg_reg_internal
...
git-svn-id: trunk@38484 -
2018-03-10 21:53:41 +00:00
florian
23722a2f95
* correctly negate 8 bit values on avr, resolves #33322
...
git-svn-id: trunk@38407 -
2018-03-04 16:28:52 +00:00
florian
311bcd4c08
* do not destroy flags while clearing R1, resolves #33170
...
git-svn-id: trunk@38241 -
2018-02-14 19:28:33 +00:00
florian
291ee4b562
* clear r1 (and save/restore) in interrupt routines on avr
...
+ generate no entry/exit code except ret for empty subroutines
git-svn-id: trunk@38233 -
2018-02-13 17:47:23 +00:00
florian
cb087279d6
* do not generate an andi if the constant is 255
...
git-svn-id: trunk@37608 -
2017-11-19 18:05:21 +00:00
florian
7817102727
* patch by Christo Crause to implement 8 bit multiplications for "mul-less" avr types, resolves issue #31925
...
git-svn-id: trunk@37380 -
2017-10-01 20:34:44 +00:00
florian
9ef646e3c5
* fix avr for new GetNextReg behaviour
...
* some wrong GetNextReg usage in the avr code generator fixed
git-svn-id: trunk@37316 -
2017-09-24 20:51:05 +00:00
nickysn
db09759763
* also integrated the getnextreg() implementation for 8-bit and 16-bit alus from
...
the avr and i8086 code generators into the base tcg class
git-svn-id: trunk@37182 -
2017-09-11 15:47:39 +00:00
nickysn
cf28b202eb
* integrated the getintregister() implementation for 8-bit and 16-bit alus from
...
the avr and i8086 code generators into the base tcg class (so it can be reused
by other 8-bit and 16-bit targets)
git-svn-id: trunk@37181 -
2017-09-11 15:23:59 +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
nickysn
3c96090d3c
+ optimized avr code generation for shr by shiftcount=size*8-1 and sar by
...
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 -
2017-08-09 15:53:06 +00:00
nickysn
5138d4e067
* fixed avr multiplication after r36344
...
git-svn-id: trunk@36369 -
2017-05-29 12:42:02 +00:00
florian
0954e09834
* correctly handle 16 bit signed operations on AVRs without mul instruction, resolves #31036
...
git-svn-id: trunk@35031 -
2016-12-01 21:01:47 +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