Commit Graph

15 Commits

Author SHA1 Message Date
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
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
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
987b66636d + optimize LDS/STS into IN/OUT, resolves issue #27884
git-svn-id: trunk@30649 -
2015-04-18 14:43:54 +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
a4c7103033 * remove useless mov instructions
git-svn-id: trunk@30522 -
2015-04-09 21:57:02 +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
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
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
florian
8f343078fa * optimize moves into movw if possible
* use ldd instruction if possible

git-svn-id: branches/avr@17105 -
2011-03-09 19:42:15 +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