Commit Graph

40 Commits

Author SHA1 Message Date
florian
7f286eb54e + define cpudelayslot: set during compiler compilation for CPUs having branch instructions with delay slot (MIPS, SPARC)
git-svn-id: trunk@36958 -
2017-08-20 17:20:38 +00:00
florian
f4718c0969 * made nop handling generic for sparc, so it is used by sparc64 as well
git-svn-id: trunk@36814 -
2017-07-29 20:06:14 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
nickysn
9b7a8f0da5 + take into account the x86 segment register in TAOptBase.RegInRef
git-svn-id: trunk@36078 -
2017-05-04 14:08:00 +00:00
florian
bc73d0914e * TAOptBase.RegInRef compares using SuperRegistersEqual as TAOptBase.RegInOp does for top_reg already
git-svn-id: trunk@34730 -
2016-10-16 16:35:36 +00:00
florian
e6cea6622e * when checking if a register is used by an operand, compare the super registers
git-svn-id: trunk@34720 -
2016-10-15 15:03:26 +00:00
florian
b274599a47 * made some assembler optimizer methods class methods
git-svn-id: trunk@33929 -
2016-06-06 21:18:20 +00:00
florian
cfd49ec708 + TAOptBase.SuperRegistersEqual
+ properly implemented TAOptObj.PrePeepHoleOpts
+ properly implemented TAOptObj.PeepHoleOptPass2

git-svn-id: trunk@33654 -
2016-05-05 12:38:19 +00:00
florian
8b4a392863 * compilation fixed
git-svn-id: trunk@33003 -
2016-01-24 16:52:49 +00:00
florian
5aabe71aee * better throw an internalerror in TAoptBase.RegLoadedWithNewValue instead of trying to make a safe approximation
git-svn-id: trunk@33002 -
2016-01-24 16:24:45 +00:00
florian
1266491085 o refactored some peephole optimizer code:
* updated TAOptObj.RegUsedAfterInstruction with the arm implementation and removed the arm specific implementation
  * RegLoadedWithNewValue and InstructionLoadsFromReg are now a methods of TAoptBase
  * moved RegEndOfLife to TAOptObj
* during this refactoring, fixed also TCpuAsmOptimizer.RegLoadedWithNewValue for arm regarding post/preindexed 
  memory references: those modify the register but do not load it with a new value in the sense of RegLoadedWithNewValue

git-svn-id: trunk@33000 -
2016-01-24 15:25:16 +00:00
Jonas Maebe
3c7ad95f7d * simplified RegInInstruction() and fixed range errors
git-svn-id: trunk@25950 -
2013-11-06 10:46:22 +00:00
sergei
a5ae26da7e * Moved SkipEntryExitMarker method from ARM optimizer to the base one, since it is not target-dependent. Now it can be reused by other targets.
git-svn-id: trunk@25738 -
2013-10-10 21:12:49 +00:00
sergei
1c84c3edbf * Fixed label optimizer to work with MIPS, and enabled level 1 optimization for MIPS targets.
The difference in branch instruction formats is isolated in function JumpTargetOp, it is a plain function rather than a virtual method, so it can be easily inlined and, after inlining, produces the same code for non-MIPS targets as it was before change.

git-svn-id: trunk@25033 -
2013-07-03 14:40:24 +00:00
florian
ca5078f9cf + RegModifiedBetween
git-svn-id: trunk@22216 -
2012-08-23 21:03:14 +00:00
florian
0c08ae8553 + RegUsedBetween
git-svn-id: trunk@22182 -
2012-08-22 19:50:55 +00:00
masta
9825fbf554 Support top_shifterop and top_regset for arm in RegInOp
RegInOp did not check for a register beeing part of a shifterop
(op.shifterop^.rs) which could result in trashed registers (But that did
not seem to happen yet anyway).

I've also implemented support for top_regset, but it is currently not
generated outside of proc_entry/proc_exit anyway.

git-svn-id: trunk@21808 -
2012-07-06 21:33:22 +00:00
florian
d4c120cb34 * fix comment so it does not confuse lazarus
git-svn-id: trunk@21305 -
2012-05-15 18:07:25 +00:00
florian
748694a325 * fixes some issues with reg. allocation information
git-svn-id: trunk@21303 -
2012-05-15 18:06:41 +00:00
florian
2a6a4831ea * basics for generic register usage information
git-svn-id: trunk@20886 -
2012-04-15 14:20:47 +00:00
florian
2f5ce095ce * RefsHaveIndexReg -> cpurefshaveindexreg
* cpurefshaveindexreg defined properly in fpcdefs.inc

git-svn-id: trunk@20504 -
2012-03-10 19:43:52 +00:00
florian
8278271b4e * fix RegInInstruction
+ introduce generic RegModifiedByInstruction

git-svn-id: trunk@20472 -
2012-03-04 20:21:14 +00:00
florian
f97730f73f * use labelCanBeSkipped as used by i386 in generic optimizer code too
git-svn-id: trunk@12807 -
2009-02-27 13:03:12 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
peter
b7fe6797bf Merged revisions 2921-2922,2925 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines

  * pass ObjectWriter to ObjectOuput

........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines

  * refactor asmdata

........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines

  * add cfi to asmdata
  * move asmlist, asmcfi, asmdata to own unit

........

git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
Jonas Maebe
ab5f5ca15e * fixed ppc compilation
git-svn-id: trunk@2778 -
2006-03-05 22:06:44 +00:00
Jonas Maebe
ab3bc45fa4 * cpu-specific overrides of optimizer methods now get called
+ first simple rlwinm optimization for ppc

git-svn-id: trunk@1320 -
2005-10-07 21:44:00 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
054f6bff3a * fixed missing cgutils usage 2004-11-03 17:51:58 +00:00
peter
c95a859f0a * generic tlocation
* move tlocation to cgutils
2004-10-31 21:45:02 +00:00
florian
e04b172854 * fixed generic optimizer
* enabled generic optimizer for sparc
2004-10-30 15:21:37 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
07783d2a0d * powerpc target fixed, very simple units can be compiled
* some basic stuff for better callparanode handling, far from being finished
2002-07-07 09:52:32 +00:00
peter
06ebac4e27 * readded missing revisions 2002-05-18 13:34:04 +00:00
carl
21b3a10f02 + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
+ try to fix temp allocation (still in ifdef)
+ generic constructor calls
+ start of tassembler / tmodulebase class cleanup
2002-05-16 19:46:34 +00:00
peter
2992e1819c * removed old logs and updated copyright year 2002-05-14 19:34:38 +00:00
peter
f6b3e2e37f * synchronized cpubase between powerpc and i386
* moved more tables from cpubase to cpuasm
  * tai_align_abstract moved to tainst, cpuasm must define
    the tai_align class now, which may be empty
2002-05-14 17:28:08 +00:00
florian
9746f4c2d6 * some cg reorganisation
* some PPC updates
2001-08-26 13:35:06 +00:00