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
Jonas Maebe
d452686c39
* moved pbestrealtype from symdef to symcpu
...
git-svn-id: trunk@27441 -
2014-04-01 21:41:37 +00:00
Jonas Maebe
dae5d1ff62
+ added class reference types of the architecture-specific t*def/t*sym
...
classes
git-svn-id: trunk@27396 -
2014-03-30 21:04:32 +00:00
Jonas Maebe
b57c95043f
+ support overriding tdef/tsym methods with target-specific functionality:
...
o made all (non-abstract) tdef and tsym constructors virtual
o added c*def/c*sym classref types for every (non-abstract) t*def/t*sym
class
o added cpusym unit for every architecture that derives a tcpu*def/tcpu*sym
class from the base classes, and initialises the c*def/c*sym classes with
them. This is done so that the llvm target will be able to derive from
the tcpu*def/sym classes without umpteen ifdefs, and it also means that
the WPO can devirtualise everything because the c* variables are only
initialised with one class type
o replaced all t*def/t*sym constructor calls with c*def/c*sym constructor
calls
git-svn-id: trunk@27361 -
2014-03-29 22:31:55 +00:00
florian
b2b26f84cf
* partially merged the mips-embedded branch of Michael Ring:
...
- startup code/controller units are not merged yet
- assembler call does not pass the needed CPU type yet
git-svn-id: trunk@27188 -
2014-03-19 21:25:38 +00:00
Jonas Maebe
e9268a0a14
* synchronised with trunk up till r26975
...
git-svn-id: branches/hlcgllvm@26976 -
2014-03-06 21:36:58 +00:00
Jeppe Johansen
10522e9779
Disabled a_adjust_sp optimized steps for now.
...
Integrated proper stack frame calculation.
Changed rjmp to jmp in ATMEGA128 interrupt vectors.
git-svn-id: trunk@26964 -
2014-03-05 19:17:46 +00:00
Jeppe Johansen
2227045e23
Replace forbidden chars in more places in the GAS assembler writer.
...
Add support for .set and .weak on AVR.
Fix 64 bit negation on AVR.
Add cpu_capabilities to cpuinfo.pas and fixed some peephole optimizations.
Pass >4 byte parameters by reference.
git-svn-id: trunk@26943 -
2014-03-04 08:01:23 +00:00
Jeppe Johansen
e33550b67d
Added support for X,Y,and Z register aliases plus low/high forms, and post-incrementation in AVR assembler reader.
...
Cleaned up parameter and funcretloc information generation in AVR paramanger, and made it closer to GCC's calling convention.
Fixed a number of codegenerator bugs generating invalid or broken instructions: CP operands were swapped, a number of instructions had immediate operands, and stack frame epilogue wasn't complete.
Added a bunch of peephole optimizations that clears the generated code up a lot.
git-svn-id: trunk@26925 -
2014-03-02 15:37:24 +00:00
sergei
9c1f917e3a
* a_call_ref functionality cannot be implemented efficiently at code generator level, because references need specific preparations at earlier points. Moved this support to tcgcallnode and its x86 descendants, and got rid of all ifdef's around.
...
+ x86 targets now directly call procedure variables located in references.
- a_call_ref method removed from tcg and thlcgobj.
git-svn-id: trunk@26666 -
2014-02-03 13:28:56 +00:00
pierre
6d4a9aad66
pass new asm extra opt using -ao option
...
git-svn-id: trunk@26539 -
2014-01-21 00:16:26 +00:00
florian
cb48c2afca
* some fixes for parameter handling on avr
...
git-svn-id: trunk@26425 -
2014-01-11 17:02:34 +00:00
florian
4d5119bf1c
* fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
...
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +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
Jonas Maebe
99de108c68
* renamed all paramanagers to tcpuparamanager so the llvm paramanager can
...
derive from them without ifdefs
git-svn-id: branches/hlcgllvm@26039 -
2013-11-11 11:15:27 +00:00
svenbarth
c48d572996
Implement support for saving and restoring address registers.
...
cgobj.pas, tcg:
* g_save_registers: add the amount of used address registers to size as well
* g_save_registers: save all used address registers
* g_restore_registers: restore all stored address registers
m68k/cpubase.pas:
* rename saved_standard_address_registers to saved_address_registers
all other platform's cpubase.{inc,pas} (except alpha, ia64 and vis which are not up to date):
* add a saved_address_registers variable with one entry of RS_INVALID
At least a "make fullcycle" did complete.
git-svn-id: trunk@25664 -
2013-10-05 21:43:42 +00:00
Jonas Maebe
9938169d2c
* don't use the paracgsize in get_paraloc_def(), because it generally
...
contains the tcgsize of the entire parameter rather than only of
what is left (-> calculate it from the remaining parameter length)
git-svn-id: trunk@24776 -
2013-06-02 14:05:07 +00:00