Commit Graph

127 Commits

Author SHA1 Message Date
florian
83a11c2a7d * patch by J. Gareth Moreton to clean up TX86AsmOptimizer.OptPass2Jcc, resolves #36295
git-svn-id: trunk@43452 -
2019-11-11 21:29:13 +00:00
florian
7464c88003 * fix and improve MovImul2Imul: we cannot insert the move target into imul if the imul is 64 bit and the mov 32 bit as
we cannot ensure that the upper 32 bits of the move target are really clear

git-svn-id: trunk@43447 -
2019-11-10 21:09:06 +00:00
florian
4b455600b8 * swapped decrefs and StripLabelFast as proposed by Gareth on the mailing list
git-svn-id: trunk@43445 -
2019-11-10 18:23:50 +00:00
florian
2d295a3816 * patch by J. Gareth Moreton, issue #36271, part 2: x86 specific rework of the jump optimizer
git-svn-id: trunk@43440 -
2019-11-10 16:11:39 +00:00
florian
20a47afe13 * more aggressive LeaCallLeaRet2Jmp
git-svn-id: trunk@43373 -
2019-11-02 22:37:31 +00:00
florian
1fc7667b3b + LeaCallLeaRet2Jmp
git-svn-id: trunk@43372 -
2019-11-02 22:37:30 +00:00
florian
6842c5784d * CallRet2Jmp works with PIC
git-svn-id: trunk@43371 -
2019-11-02 22:37:29 +00:00
florian
3487c34ed9 * unified TX86AsmOptimizer.OptPass1MOVAP and TX86AsmOptimizer.OptPass1VMOVAP
git-svn-id: trunk@43370 -
2019-11-02 18:48:23 +00:00
florian
f9530437c2 * fix i386 building
git-svn-id: trunk@43369 -
2019-11-02 18:34:53 +00:00
florian
c3ef42b164 * allow cmov with memory reference if it is a pure symbol or a rip relative symbol: as the symbol is
allocated within the image of the program, this should never cause a seg. fault, so it is save
    to use cmov with it

git-svn-id: trunk@43368 -
2019-11-02 18:09:11 +00:00
florian
172a4a999b + MovMov2Mov 6 and MovMov2Mov 7 optimization
git-svn-id: trunk@43339 -
2019-10-30 22:39:13 +00:00
florian
cfec725195 * clean up TX86AsmOptimizer.OptPass1MOV
git-svn-id: trunk@43336 -
2019-10-30 20:07:26 +00:00
florian
533a113885 + LeaCallLeaRet2Jmp optimization
git-svn-id: trunk@43178 -
2019-10-12 21:51:15 +00:00
florian
00c2fd4005 + x86: LeaLea2Lea optimization
git-svn-id: trunk@43177 -
2019-10-12 21:51:14 +00:00
pierre
af03c0208b Use tcgint typecast instead of aint, as it is the type of the second parameter of loadconst taicpu method
git-svn-id: trunk@42281 -
2019-06-25 04:24:56 +00:00
Jonas Maebe
281b3ad276 * fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit

git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
florian
d657373933 * patch by J. Gareth Moreton which avoids that the optimizer causes reads of invalid memory, resolves #35187
git-svn-id: trunk@41667 -
2019-03-10 10:48:50 +00:00
florian
c7bb028d35 * factored out OptPass1FLD, used bx x86-64 now as well
- removed unused function

git-svn-id: trunk@41061 -
2019-01-24 20:10:29 +00:00
florian
6cb6517411 * better recognization of procedure exit code
git-svn-id: trunk@41060 -
2019-01-24 19:53:51 +00:00
florian
24f6cc0da5 * factored out OptPass1FSTP, used by x86-64 now as well
git-svn-id: trunk@41059 -
2019-01-24 19:38:32 +00:00
florian
cfd0790f89 * avoid assembler errors for the MovOpMov2MovOp optimziation in case the size of the instruction
gets changed and the first one contains a constant, resolves #34933

git-svn-id: trunk@41021 -
2019-01-23 21:02:14 +00:00
florian
4fb7b5d3ff * fix MovOpMov2MovOp optimization if no -Cpcoreavx2 is used
git-svn-id: trunk@40979 -
2019-01-21 21:57:07 +00:00
florian
75a89d2115 * fix and enable MovOpMov2MovOp optimization on x86-64
git-svn-id: trunk@40941 -
2019-01-20 17:00:43 +00:00
florian
94d7a02fae * modified patch by Gareth Moreton to pool TmpUsedRegs in the assembler optimizers, resolves #34679
git-svn-id: trunk@40938 -
2019-01-20 14:16:38 +00:00
Jonas Maebe
122d0d36d6 + volatile() expression that marks an expression as volatile
* disable matching volatile references in the assembler optimisers, so they
    can't be removed (more conservative than needed, but better than removing
    too many)
   o the CSE optimiser will ignore them by default, because they're an unknown
     inline node for it
  * also removed no longer used fpc_in_move_x and fpc_in_fillchar_x inline node
    identifiers from rtl/inc/innr.inc, and placed fpc_in_unaligned_x at the
    right place

git-svn-id: trunk@40465 -
2018-12-04 19:53:20 +00:00
florian
c43cae9231 * disable MovOpMov2MovOp optimization on x86-64 for now as it seems to break
git-svn-id: trunk@40361 -
2018-11-21 21:22:54 +00:00
florian
477d7be651 * building on i386-linux fixed
git-svn-id: trunk@40360 -
2018-11-21 19:19:24 +00:00
florian
ac37a54d79 + MovOpMov2MovOp optimization
git-svn-id: trunk@40359 -
2018-11-20 22:20:43 +00:00
yury
30d64cec68 * Removed unused local vars.
git-svn-id: trunk@40185 -
2018-11-02 18:51:19 +00:00
yury
4357caaad8 * Removed unused local vars.
git-svn-id: trunk@40183 -
2018-11-02 18:44:29 +00:00
florian
59d5d6ec95 + factored out TX86AsmOptimizer.PrePeepholeOptIMUL, used now by x86-64 and i386
* generalized and simplified the code

git-svn-id: trunk@40162 -
2018-11-01 20:49:20 +00:00
pierre
e5dffebdc7 Avoid range check error in MaskLength evaluation
git-svn-id: trunk@40110 -
2018-10-31 14:51:23 +00:00
florian
9805214d34 * properly take care of register allocations between the first and second instruction for the FoldLea optimization
* check for ait_instruction after a GetNextInstruction function call
* cosmetics

git-svn-id: trunk@39983 -
2018-10-18 18:28:03 +00:00
florian
5782acc32d * patch by J. Gareth Moreton to fix 33909
git-svn-id: trunk@39353 -
2018-07-01 12:54:30 +00:00
florian
78943ea843 + patch by J. Gareth Moreton: x86 optimisations for Jcc and SETcc, resolves #33899
* optimization also added for i386

git-svn-id: trunk@39307 -
2018-06-25 20:40:05 +00:00
florian
1472a81768 * patch by J. Gareth Moreton to unify the x86 assembler optimizer method headers, resolves #33908
git-svn-id: trunk@39305 -
2018-06-25 20:13:34 +00:00
florian
0d168796d7 * patch by J. Gareth Moreton: More Peephole optimizations for AND and MOV
git-svn-id: trunk@39242 -
2018-06-18 20:50:08 +00:00
florian
a0b343a787 * patch by J. Gareth Moreton for less invasive DEBUG_AOPTCPU
git-svn-id: trunk@39239 -
2018-06-17 14:56:19 +00:00
florian
9b18e39c81 * enable Lea2AddBase and Lea2AddIndex in TX86AsmOptimizer.PostPeepholeOptLea as we have flag tracking now
* some flag allocations fixed

git-svn-id: trunk@38501 -
2018-03-11 20:30:09 +00:00
florian
5fbecc5501 + use TX86AsmOptimizer.OptPass1SHLSAL on x86-64
git-svn-id: trunk@38499 -
2018-03-11 14:35:22 +00:00
florian
47927f053a * factored out TX86AsmOptimizer.OptPass1SHLSAL
git-svn-id: trunk@38498 -
2018-03-11 14:35:19 +00:00
florian
78878f59b1 + generic TAOptObj.AllocRegBetween
- removed x86 specific AllocRegBetween

git-svn-id: trunk@38445 -
2018-03-07 22:17:35 +00:00
florian
c5f8567ed7 * getsubreg => getsupreg
git-svn-id: trunk@38344 -
2018-02-25 15:34:14 +00:00
florian
fc6c0e8ef4 + AndShlToShl optimization
* moved topsize2memsize to cpubase

git-svn-id: trunk@38343 -
2018-02-25 15:34:12 +00:00
florian
6e811d057c * MovOpMov2Op cannot be applied for L, Q, Q as operand sizes
+ test

git-svn-id: trunk@38337 -
2018-02-25 10:19:52 +00:00
florian
e92422383a * compilation fixed
git-svn-id: trunk@38280 -
2018-02-18 09:29:36 +00:00
florian
91514da267 * factored out TX86AsmOptimizer.PostPeepholeOptCall
+ use TX86AsmOptimizer.PostPeepholeOptCall on x86-64

git-svn-id: trunk@38278 -
2018-02-17 23:25:01 +00:00
florian
1b3627add1 + peephole optimization MovMov2Mov 5
git-svn-id: trunk@38273 -
2018-02-17 21:10:51 +00:00
florian
5eb59196d5 * remove sequential moves to the same register
+ test

git-svn-id: trunk@38267 -
2018-02-17 12:45:17 +00:00
florian
99f1fe54af * check for registers removed which is not needed anymore
git-svn-id: trunk@38265 -
2018-02-17 12:45:13 +00:00