Jeppe Johansen
a7d3d2d298
Fixed internal error in case inline assembler constants are used.
...
git-svn-id: trunk@37859 -
2017-12-29 11:50:36 +00:00
Jeppe Johansen
4a169e6b1a
Changed subarch of at90pwm161
...
git-svn-id: trunk@37858 -
2017-12-29 11:30:35 +00:00
florian
0f51cf8546
* avr: correctly write references to nil, resolves #32821
...
git-svn-id: trunk@37838 -
2017-12-28 10:32:16 +00:00
florian
46ab35edb3
* apply MovOpMov2Op also to inc and dec
...
* made core more readable
git-svn-id: trunk@37624 -
2017-11-26 15:28:44 +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
366360d36c
* LdiMov/Cp2Ldi/Cpi may not be performed if reg0=reg1
...
* cleanup of MovOp2Op
* fixed MovMov2Mov
git-svn-id: trunk@37607 -
2017-11-19 18:05:19 +00:00
florian
ad01f059e8
* after a LdiMov/Cp2Ldi/Cpi optimization, the compiler should not continue to optimize this instruction because then reg. alloc info is wrong
...
git-svn-id: trunk@37604 -
2017-11-19 18:05:14 +00:00
florian
c7d5525b56
+ implemented some AVR specific intrinsics
...
git-svn-id: trunk@37544 -
2017-11-01 16:33:34 +00:00
florian
3d3298f64d
* write absolute references correctly on avr, resolves #32040
...
git-svn-id: trunk@37419 -
2017-10-07 21:09:20 +00:00
florian
4cf2a2672a
changes to fix #32043
...
* changed most of the variables in the assembler readers used to store constants from aint to tcgint
as aint has only the size of the accumular while some CPUs (AVR) allow larger constants in instructions
+ allow access to absolute symbols with address type in inline assembler
* allow absolute addresses in avr inline assembler
+ tests
git-svn-id: trunk@37411 -
2017-10-06 21:07:19 +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
1c69ae6a15
handle correctly "reg+const" operands in avr assembler, fixes issue #32016
...
git-svn-id: trunk@37328 -
2017-09-26 20:14:41 +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
1476b5168d
+ added F_PL and F_MI to TResFlags for avr. This allows generating the BRPL and
...
BRMI instructions via a_jmp_cond
git-svn-id: trunk@36866 -
2017-08-09 15:14:33 +00:00
svenbarth
e76b1b2959
* use unique internalerror instead of copying that from ncgmem (though it should never happen that both occur at once in a AVR compiler)
...
git-svn-id: trunk@36809 -
2017-07-28 15:54:03 +00:00
florian
a2e442e111
* keep the names of X, Y and Z in assembler files, fixes issue #32150
...
git-svn-id: trunk@36776 -
2017-07-23 19:24:45 +00:00
nickysn
5138d4e067
* fixed avr multiplication after r36344
...
git-svn-id: trunk@36369 -
2017-05-29 12:42:02 +00:00
svenbarth
7c9aeda656
* rework InsertInitFinalTable a bit more so that the list of init/fini entries does not need to be generated twice for AVR
...
git-svn-id: trunk@36310 -
2017-05-23 19:58:39 +00:00
svenbarth
fab6f70de8
* rework AVR's InsertInitFinalTable to make use of get_init_final_list instead of iterating the init/fini functions itself
...
git-svn-id: trunk@36309 -
2017-05-23 19:46:07 +00:00
Jonas Maebe
61af0fb72d
* only take into account the location of the parameter at the callee side to
...
determine whether it's in a register if it's a pure assembler routine
* you can't "index" implicit pointers either using their fields
git-svn-id: trunk@36287 -
2017-05-21 20:17:11 +00:00
florian
4a43d992f5
* unified usage of MatchOpType
...
* fixed generic MatchOpType
git-svn-id: trunk@36145 -
2017-05-07 16:18:33 +00:00
florian
39b7f1bffe
* do not write assembler optimizer debug output in avr assembler files
...
git-svn-id: trunk@36063 -
2017-05-02 19:50:37 +00:00
Jonas Maebe
aa82e00615
* fixed check to determine whether a record parameter can be subscripted
...
directly in inline assembly: that's only possible if it's a register
parameter where the address of the record was passed (rather than the
record itself), or if a parameter has been explicitly typecasted in
Intel-style assembly using ".size"
git-svn-id: trunk@35959 -
2017-04-26 19:43:35 +00:00
florian
73c46a5988
- removed unused constants
...
git-svn-id: trunk@35664 -
2017-03-26 13:06:34 +00:00
Jonas Maebe
015f034904
* reverted r35424, wasn't ready for commit yet
...
git-svn-id: trunk@35426 -
2017-02-11 21:21:44 +00:00
Jonas Maebe
4d9617da97
* fixed check to determine whether a record parameter can be subscripted
...
directly in inline assembly: that's only possible if it's a register
parameter where the address of the record was passed (rather than the
record itself)
git-svn-id: trunk@35424 -
2017-02-11 19:57:08 +00:00
Jonas Maebe
880d438704
* renamed t<cpuname>procinfo to tcpuprocinfo for all targets, so we can
...
inherit from it for LLVM without a thousand ifdefs
git-svn-id: trunk@35141 -
2016-12-16 22:41:21 +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
florian
da7e1b3769
+ tavraddrnode.pass_generate_code, avoiding unneeded moves
...
git-svn-id: trunk@34973 -
2016-11-26 19:31:33 +00:00
florian
8e7101a65a
* proper naming of the optimziation in the DebugMsg
...
git-svn-id: trunk@34957 -
2016-11-24 18:28:48 +00:00
florian
e33b2920dc
+ CallReg2Jmp optimization
...
git-svn-id: trunk@34937 -
2016-11-20 18:00:27 +00:00
florian
3eef641833
* convert jmp into rjmp only of the target is not a function
...
git-svn-id: trunk@34936 -
2016-11-20 18:00:01 +00:00
florian
0882c13cb7
* do not move dest to a new register if not needed in tcgavr.g_concatcopy
...
git-svn-id: trunk@34935 -
2016-11-20 16:07:53 +00:00
florian
e49a826837
+ PushPushPopPop2MovMov optimization
...
git-svn-id: trunk@34934 -
2016-11-20 16:03:49 +00:00
florian
0520d246d0
* changed LdiCp2Cpi into LdiMov/Cp2Ldi/Cpi and improved it
...
git-svn-id: trunk@34920 -
2016-11-19 19:22:47 +00:00
florian
c86bac021b
+ xch instruction for avr
...
git-svn-id: trunk@34919 -
2016-11-19 19:21:09 +00:00
Jonas Maebe
86876ed114
* MaybeRecordOffset: initialise "mangledname" variable
...
git-svn-id: trunk@34857 -
2016-11-09 19:51:36 +00:00
Jonas Maebe
74a49b5f91
* restructured the the TExternalAssembler constructors so that the
...
hack for the Jasmin descendent is no longer needed
git-svn-id: trunk@34852 -
2016-11-09 19:51:20 +00:00
pierre
89c1b68b14
* Delete regvars unit.
...
This unit was empty unless OLDREGVARS macro was set,
but this does not compile and no change has been made since 2011.
* Remove regvars from all _USES clauses.
git-svn-id: trunk@34808 -
2016-11-06 14:01:39 +00:00
Jonas Maebe
0afbe85aab
* various memory reference alignment fixes
...
git-svn-id: trunk@34544 -
2016-09-20 21:43:19 +00:00
Jonas Maebe
aa1be3276f
- removed default value of _typ parameter of TAsmData.(Weak)RefAsmSymbol():
...
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 -
2016-08-05 07:09:16 +00:00
Jonas Maebe
a0efde8167
* automatically generate necessary indirect symbols when a new assembler
...
symbol is defined
o removed all places where AB_INDIRECT symbols were explicitly generated
o only generate AB_INDIRECT symbols for AT_DATA on systems_indirect_var_imports
o for some symbols an indirect symbol is always required (because they are
dereferenced by code in RTL units) -> use new AT_DATA_FORCEINDIRECT type
git-svn-id: trunk@34165 -
2016-07-20 20:53:03 +00:00
Jonas Maebe
1cb8c0d00c
* specify the def of assembler level symbols defined via
...
tasmdata.DefineAsmSymbol() and all routines that call it
o will be used to automatically generate AB_INDIRECT sybols when
necessary
git-svn-id: trunk@34164 -
2016-07-20 20:52:59 +00:00
florian
b2f15e2736
* first check for ait_instruction before checking opcode
...
git-svn-id: trunk@33693 -
2016-05-16 13:10:20 +00:00
florian
56b6cedcf4
* increase ram size of the avrsim controller target
...
git-svn-id: trunk@33066 -
2016-02-07 11:17:55 +00:00
Jonas Maebe
110a5642c0
- removed ait_weak/tai_weak, and replaced it with the previously existing
...
asd_weak_reference/asd_weak_definition directives
git-svn-id: trunk@32879 -
2016-01-07 22:05:38 +00:00
florian
bd20c5a66b
* set a proper sram base for the avrsim controller type
...
git-svn-id: trunk@32647 -
2015-12-12 22:37:41 +00:00
Jeppe Johansen
159c28eca8
Fix AVR comparison with zero.
...
git-svn-id: trunk@32589 -
2015-12-05 15:25:33 +00:00
Jeppe Johansen
5ec4d38231
Add support for ram-less AVR chips and simultanously optimize flash/ram size the initfinal calling sequence.
...
git-svn-id: trunk@32448 -
2015-11-22 00:37:10 +00:00
Jeppe Johansen
baae6ec169
Fix incorrect AVR optimization.
...
git-svn-id: trunk@32441 -
2015-11-21 16:53:56 +00:00
Jonas Maebe
fa3b0ca312
* support marking defs created via the getreusable*() class methods as
...
"don't free even if not registered"; use for defs that may not be written
to a ppu file, but that must nevertheless survive the compilation of the
current module
* mark all defs created for para locations as "don't free even if not
registered", because we don't discard and recalculate all para locations
after a module has been compiled (since that's not needed)
o solves issues if the paralocations for a routine in the interface of
unit A are calculated while the implementation of unit B gets
compiled, and a new reusable type is allocated at that point which
is not used anywhere else (after r32160)
git-svn-id: trunk@32235 -
2015-11-04 20:46:18 +00:00
Jeppe Johansen
14020b044c
Fix bug in gen_load_cgpara_loc for 64bit registers on 8bit architectures.
...
Added a workaround in a_load_const_reg to allow compilation for AVR.
git-svn-id: trunk@32090 -
2015-10-18 11:36:58 +00:00
Jeppe Johansen
1a285a7d24
Fixed an off-by-one error in a_load_const_cgpara which caused some problems.
...
Added some minor CG optimizations.
git-svn-id: trunk@32088 -
2015-10-18 11:03:57 +00:00
Jeppe Johansen
7fc3ed2644
Fix a broken OpCp2Op optimization. It needed the added NR_DEFAULTFLAGS allocation to not break subsequent optimizations.
...
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 -
2015-10-17 23:29:15 +00:00
Jonas Maebe
991e1f49bd
* store a pointer to the used tasminfo record in every assembler writer, so
...
that we can use assembler writers with different conventions from the
currently set target_asm (e.g. an x86 assembler writer for inline assembly
in LLVM IR)
git-svn-id: trunk@31628 -
2015-09-12 23:32:13 +00:00
Jonas Maebe
b3d0197f98
* factored out the output file handling (mostly writing data) from the
...
external assembler writer, so we can reuse the archtecture-specific
writers to write inline assembly in LLVM IR files
git-svn-id: trunk@31625 -
2015-09-12 23:32:01 +00:00
Jeppe Johansen
3cb9be73bc
Moved tcontrollerdatatype out into cpuinfo.
...
Added cputype and fputype info to tcontrollerdatatype arrays.
git-svn-id: trunk@31574 -
2015-09-07 20:36:54 +00:00
Jonas Maebe
10b2ea3b1b
* use handle_locjump() instead of local inlined version
...
git-svn-id: trunk@31430 -
2015-08-27 18:28:52 +00:00
Jeppe Johansen
ffe67a93b4
Fix is_calljmp to include call instructions. This was breaking some optimizations previously.
...
Add debug messages to peephole optimizations and add some extra optimizations.
git-svn-id: trunk@31244 -
2015-07-30 06:29:21 +00:00
Jeppe Johansen
55669f62b1
Added most AVR controllers.
...
Made absolutevarsym use PUint instead of AWord for its offset to fix range errors.
git-svn-id: trunk@31242 -
2015-07-29 21:01:21 +00:00
florian
d014572b8e
* do not use an extra register, if CPC does a comparison with 0,
...
this was previously "fixed" by the peephole optimizer, but this increased
register pressure
git-svn-id: trunk@31239 -
2015-07-27 19:49:05 +00:00
florian
df999735f3
* use R1 in comparisons if left=0 instead of loading 0 into (a) register(s)
...
git-svn-id: trunk@31238 -
2015-07-27 19:49:03 +00:00
florian
cf64e05c6f
* use generic mod/div code for avr
...
git-svn-id: trunk@31194 -
2015-07-05 17:05:43 +00:00
florian
af6ffd751f
+ generate optimized code for shifts/rotates by constants
...
git-svn-id: trunk@31170 -
2015-06-28 20:28:51 +00:00
Jonas Maebe
f402b0d7df
* changed getpointerdef() into a tpointerdef.getreusable() class method
...
o allows removing the ugly x86 hacks
git-svn-id: trunk@31144 -
2015-06-22 08:17:49 +00:00
florian
c0dd2047f9
* cosmetics, entries are now properly aligned
...
git-svn-id: trunk@31039 -
2015-06-13 16:55:36 +00:00
Jeppe Johansen
ab9c8bb569
Fixed startup assembler code for the case where there's no data in .bss and/or in .data.
...
Fixed _stack_top symbol calculation so it works for all controllers.
Added ATTINY2313 controller.
git-svn-id: trunk@31031 -
2015-06-13 12:30:50 +00:00
Jeppe Johansen
03880c2f74
Added some peephole optimizations, and fixed generic unconditional jump optimizations, for AVR.
...
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 -
2015-06-13 12:25:11 +00:00
florian
b1147ba1b7
+ OpCmp2Op optimization for AVR
...
git-svn-id: trunk@31013 -
2015-06-09 21:06:37 +00:00
florian
9216e561e2
+ make use of sbi/cbi
...
git-svn-id: trunk@30964 -
2015-05-31 21:11:53 +00:00
florian
a3553a7320
+ adds missing ct_atmega168 and ct_atmega368 symbols, thanks to mischi
...
git-svn-id: trunk@30960 -
2015-05-31 17:59:39 +00:00
florian
cf552b2a0b
+ ATmeag168/ATmeag368 support
...
git-svn-id: trunk@30938 -
2015-05-30 18:01:14 +00:00
florian
0cd521fc8b
+ ATmega48/ATmega88 support
...
git-svn-id: trunk@30937 -
2015-05-30 17:55:49 +00:00
florian
aadcf9f6bc
* do not convert JMP into RJMP in assembler blocks, resolves issue #280208
...
git-svn-id: trunk@30936 -
2015-05-30 16:17:24 +00:00
florian
d58d7b7838
* fixes breakage of r30930 (+ ATtiny24/ATtiny44/ATtiny84 support)
...
git-svn-id: trunk@30932 -
2015-05-28 21:15:00 +00:00
florian
0f73675354
+ ATtiny24/ATtiny44/ATtiny84 support
...
git-svn-id: trunk@30930 -
2015-05-28 21:10:39 +00:00
florian
b4fc11fe06
* implemented r30870 for all platforms: pass dyn. array parameters like pointer parameters so typically in a register
...
git-svn-id: trunk@30878 -
2015-05-17 12:29:28 +00:00
florian
f5edf77a05
+ Atmega8 support
...
git-svn-id: trunk@30768 -
2015-05-02 18:18:00 +00:00
florian
9a5b458d4e
* allocate registers properly before icall
...
* use emit_mov to load registers before icall
git-svn-id: trunk@30758 -
2015-05-02 08:02:17 +00:00
florian
7dd1d6aa77
o fixes handling of iso i/o parameters/program parameters:
...
* explicit reset is needed
* variable must be declared again
git-svn-id: trunk@30757 -
2015-05-01 20:58:31 +00:00
florian
d1e48b0f71
* correctly handle parameters on the stack with OS_NO
...
git-svn-id: trunk@30756 -
2015-05-01 17:14:07 +00:00
florian
d3fbfa225f
* fixes ordinal comparisons with constants
...
git-svn-id: trunk@30751 -
2015-05-01 16:30:21 +00:00
florian
e56d8d1c96
* fix mov rX,...; mov rX,... optimization, hp1 needs to be checked if it is really an instruction, resolves issue #27975
...
git-svn-id: trunk@30738 -
2015-04-27 20:36:53 +00:00
florian
3282ff0506
+ remove dead moves, resolves issue #27842
...
git-svn-id: trunk@30735 -
2015-04-26 20:13:09 +00:00
florian
5c8d0d87cd
o better code generation for avr:
...
* 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 -
2015-04-26 19:39:43 +00:00
florian
634a25d9f6
* cosmetics
...
git-svn-id: trunk@30731 -
2015-04-26 19:35:32 +00:00
florian
652f623983
* mulsu opcode spelling fixed
...
* handling mulsu in taicpu.spilling_get_operation_type
git-svn-id: trunk@30729 -
2015-04-26 16:08:52 +00:00
florian
40dc34b9d8
* several issues with the avr instruction table fixes, resolves issue #27963
...
git-svn-id: trunk@30727 -
2015-04-25 21:33:19 +00:00
Jeppe Johansen
2dae6a2dd7
Added predecrement addressing support to the AVR assembler reader
...
git-svn-id: trunk@30706 -
2015-04-24 17:25:57 +00:00
florian
1969abec77
* improved code generation in a_op_const_reg_internal and a_op_const_reg_reg
...
git-svn-id: trunk@30662 -
2015-04-19 12:51:53 +00:00
florian
7f1585b99a
* do not save registers for subroutines which never return
...
* do not generate any exit code for subroutines which never return
git-svn-id: trunk@30657 -
2015-04-19 08:11:28 +00:00
florian
987b66636d
+ optimize LDS/STS into IN/OUT, resolves issue #27884
...
git-svn-id: trunk@30649 -
2015-04-18 14:43:54 +00:00
florian
9e51283ae0
+ initial a_op_const_reg_reg and a_op_reg_reg_reg implementations to generate optimized 16 Bit multiplications on avr
...
git-svn-id: trunk@30648 -
2015-04-18 13:53:20 +00:00
florian
3e8766290d
* implements RegInInstruction and fixes RegModifiedByInstruction for avr
...
git-svn-id: trunk@30647 -
2015-04-18 13:51:28 +00:00
florian
58c66b4759
* the mul instructions do not modify the operands
...
git-svn-id: trunk@30633 -
2015-04-17 20:15:10 +00:00
florian
66e97549b9
* replace jmp by rjmp if possible, resolves issue #27885
...
git-svn-id: trunk@30632 -
2015-04-17 20:14:18 +00:00
florian
e733efbbc2
* proper tavrprocinfo.calc_stackframe_size
...
git-svn-id: trunk@30597 -
2015-04-14 20:48:13 +00:00
florian
cf58a7ad60
* cosmetics
...
git-svn-id: trunk@30595 -
2015-04-14 20:47:26 +00:00
florian
b84657980d
* make OS_INT/OS_SINT 8 Bit on avr, should work better on avr, resolves #27840
...
git-svn-id: trunk@30593 -
2015-04-14 18:51:21 +00:00
florian
e559b9e3d6
+ tavrshlshrnode.second_integer, does not convert the right operand to a bigger type, resolves #27841
...
git-svn-id: trunk@30579 -
2015-04-13 20:57:37 +00:00
florian
8b7a449cf1
* clear r1 after 8 Bit multiplication, resolves #27838
...
git-svn-id: trunk@30578 -
2015-04-13 20:15:30 +00:00
florian
4d01271944
* due to avr's harvard architecture, loads of code labels need to use the gs(...) macro
...
git-svn-id: trunk@30559 -
2015-04-12 20:29:13 +00:00
florian
1f20a52c85
* fix typo in comparison with constant code
...
git-svn-id: trunk@30556 -
2015-04-12 15:42:40 +00:00
florian
bd803769b8
* fix compilation
...
git-svn-id: trunk@30554 -
2015-04-12 14:58:41 +00:00
florian
9559dabe51
* function result is in r24:r25
...
git-svn-id: trunk@30549 -
2015-04-11 21:25:05 +00:00
florian
e34bd746ed
* patch by Jeppe Johanse to take care of the fact that push is post-decrement on avr
...
git-svn-id: trunk@30548 -
2015-04-11 20:59:27 +00:00
florian
1ef7e36f3c
* some fixes for handling parameters passed on the stack
...
git-svn-id: trunk@30545 -
2015-04-11 13:56:21 +00:00
florian
276d97f653
* generate better code for comparisons with constants
...
git-svn-id: trunk@30543 -
2015-04-11 13:52:29 +00:00
florian
4b7ae00620
* fixes several issues with parameter handling on avr
...
git-svn-id: trunk@30541 -
2015-04-11 11:13:20 +00:00
florian
03fa8336de
o several avr fixes
...
* 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 -
2015-04-11 11:08:01 +00:00
florian
315d7d9725
+ do_spill_replace for avr
...
git-svn-id: trunk@30535 -
2015-04-10 22:14:36 +00:00
florian
a4c7103033
* remove useless mov instructions
...
git-svn-id: trunk@30522 -
2015-04-09 21:57:02 +00:00
florian
ef2e2c5033
* assign registers for parameters correctly, resolves #27804
...
git-svn-id: trunk@30520 -
2015-04-09 20:39:18 +00:00
florian
6a032bee1b
* improved code generation for a_load_const_reg and a_op_const_reg
...
git-svn-id: trunk@30519 -
2015-04-09 20:38:19 +00:00
florian
061a1aacf3
* named class properly
...
git-svn-id: trunk@30518 -
2015-04-09 20:36:47 +00:00
florian
9af36c2257
* several fixes for spilling_get_operation_type
...
git-svn-id: trunk@30517 -
2015-04-09 20:33:40 +00:00
florian
63bf17440c
* use volatile registers first
...
* fix some range check errors
git-svn-id: trunk@30444 -
2015-04-05 19:17:24 +00:00
florian
db63693b7e
* tai returned by GetNextInstructionUsingReg must be checked if it is really an instruction
...
git-svn-id: trunk@30443 -
2015-04-05 19:12:43 +00:00
florian
2b9c0ef3b4
- jmp_instructions shouldn't include call/ret instructions
...
git-svn-id: trunk@30442 -
2015-04-05 19:11:40 +00:00
Jonas Maebe
61e4a1b811
+ added tasmlist parameter to getintparaloc() (needed for llvm)
...
git-svn-id: trunk@30429 -
2015-04-04 14:29:16 +00:00
Jeppe Johansen
8c105d4c97
Fix off by 8 error.
...
git-svn-id: trunk@30393 -
2015-03-30 12:03:18 +00:00
Jeppe Johansen
7fe4b13248
Fix broken peephole optimization that was testing the wrong register for modifications.
...
Fix tests on unsigned values. The flags were swapped.
git-svn-id: trunk@30392 -
2015-03-30 11:17:38 +00:00
florian
dfd4d3656b
+ avrsim controller target requiring a special avr simulator with a certain memory location handling, see avrsim.pp controller helper unit for what it is needed
...
git-svn-id: trunk@30385 -
2015-03-29 21:13:36 +00:00
florian
873d88ba57
* fix 8 Bit*8 Bit multiplication according to #27737 using modified code supplied by Georg Hieber
...
git-svn-id: trunk@30381 -
2015-03-29 19:58:30 +00:00
florian
ad995eb121
* use correctly CALL/RCALL and JMP/RJMP on avr, resolves #27738
...
git-svn-id: trunk@30372 -
2015-03-29 18:26:32 +00:00
Jonas Maebe
bd203a5b57
* synchronised with trunk till r30240
...
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
florian
38a72f2ddb
* renamed arm->avr to match the cpu
...
git-svn-id: trunk@30237 -
2015-03-15 15:10:37 +00:00
Jonas Maebe
8445381929
* merged ait_set and ait_thumb_set into a single tai class
...
(tai_symbolpair)
git-svn-id: trunk@30197 -
2015-03-14 18:35:28 +00:00
Jonas Maebe
67b8aceaee
* synchronized with privatetrunk till r30095
...
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
florian
5c67fcc43f
+ change always floating point divisions into multiplications if they are a power of two,
...
this is an exact operation so it is always allowed
* change only divisions by normal numbers into multiplications
git-svn-id: trunk@29085 -
2014-11-16 20:47:38 +00:00
Tomas Hajny
3ee3542744
* boolean constant instead of IFDEFs for detection of microcontroller support
...
git-svn-id: trunk@29052 -
2014-11-10 12:34:59 +00:00
florian
c72d5a557a
* improve spilling_get_operation_type for avr
...
git-svn-id: trunk@28745 -
2014-10-04 18:14:40 +00:00
florian
6b7557924e
* fix assignintreg on avr
...
git-svn-id: trunk@28744 -
2014-10-04 18:14:11 +00:00
Károly Balogh
d22dc68fda
* fixed DFA warnings for MIPS and AVR
...
git-svn-id: trunk@28502 -
2014-08-20 15:05:43 +00:00
Károly Balogh
0cf7357ee2
* fix GetResFlags DFA optimizer warning on Sparc and AVR too
...
git-svn-id: trunk@28500 -
2014-08-20 13:52:28 +00:00
Jonas Maebe
b18ba8e85b
* syncrhonised with trunk up till r28471
...
git-svn-id: branches/hlcgllvm@28495 -
2014-08-19 20:23:11 +00:00
Jonas Maebe
b745dcc64c
* moved g_external_wrapper() to the hlcg, and also g_intf_wrapper() because
...
for some platforms it depends on that routine
git-svn-id: branches/hlcgllvm@28492 -
2014-08-19 20:22:54 +00:00
Jonas Maebe
7e3abd4b38
* fixed warning about signed integer to pointer conversion
...
git-svn-id: trunk@28460 -
2014-08-18 23:00:53 +00:00
Jonas Maebe
e7ac66a6c4
* removed nested comments
...
git-svn-id: trunk@28457 -
2014-08-18 22:34:35 +00:00
Jonas Maebe
5c75b6dd6b
* synchronised with trunk up till r28402
...
git-svn-id: branches/hlcgllvm@28403 -
2014-08-13 16:04:30 +00:00
sergei
e4fea2ebc8
* Dummy implementations of a_bit_scan_reg_reg and g_stackpointer_alloc in tcg, removes the need to override these methods in every descendant code generator solely to avoid "constructing a class with abstract method" warning.
...
git-svn-id: trunk@28175 -
2014-07-06 11:34:04 +00:00
Jonas Maebe
1516661249
+ new chlcgobj class reference variable that can be used to call thlcg*
...
virtual methods even when hlcg doesn't contain a valid instance
git-svn-id: branches/hlcgllvm@28143 -
2014-07-03 22:28:31 +00:00
Jonas Maebe
bacd303208
* synchronized with trunk up to r27758
...
git-svn-id: branches/hlcgllvm@27779 -
2014-05-12 16:12:34 +00:00
svenbarth
02495c17bd
Fix a typo. The CPU specific version of "ttypesym" should be called "tcputypesym" and not "tcpuypesym".
...
git-svn-id: trunk@27531 -
2014-04-11 14:30:59 +00:00
sergei
eeb15fc445
* Added virtual method tprocinfo.postprocess_code and moved target-specific processing from base class into target-specific descendant classes (ARM and AVR, other targets still to do).
...
git-svn-id: trunk@27449 -
2014-04-02 13:14:06 +00:00