florian
a8643410c4
* fix trgx86.do_spill_replace for bmi rotating/shifting instructions
...
git-svn-id: trunk@26739 -
2014-02-08 21:38:23 +00:00
florian
be0a29da95
* fix modification information for bmi instructions
...
git-svn-id: trunk@26738 -
2014-02-08 21:38:21 +00:00
florian
9d84b83475
* fix comment
...
git-svn-id: trunk@26737 -
2014-02-08 21:38:18 +00:00
sergei
d7c7ee2c2a
* MIPS: fixed 8/16 bit arithmetic shifting to be done without using an additional register.
...
git-svn-id: trunk@26736 -
2014-02-08 21:13:58 +00:00
sergei
d29300df13
* tMIPSELnotnode.second_boolean: reuse common handle_locjump method.
...
git-svn-id: trunk@26735 -
2014-02-08 21:10:01 +00:00
yury
e0c8a4701e
* Fixed compilation for mips-linux.
...
git-svn-id: trunk@26732 -
2014-02-08 19:08:21 +00:00
florian
e5aa0e4316
* set pi_uses_exceptions flag only if the try...finally frame is not an implicit frame
...
git-svn-id: trunk@26731 -
2014-02-08 16:43:23 +00:00
florian
1df293679d
* fixed setting of pi_uses_exception flags and unified usage, they should be set in pass_1
...
git-svn-id: trunk@26729 -
2014-02-08 14:59:07 +00:00
florian
53ddaf03ff
* fixes masking error in tx8664shlshrnode.pass_generate_code
...
* cleaned up tx8664shlshrnode.pass_generate_code and fix register loading of the right node, resolves #25664
git-svn-id: trunk@26716 -
2014-02-08 10:15:47 +00:00
florian
1366498255
+ nf_addr_taken: it marks nodes which address is taken
...
+ check if tnodeflags is 4 bytes or less
* do not do cse on expressions which address is taken
git-svn-id: trunk@26713 -
2014-02-07 20:40:42 +00:00
yury
c58340f8dd
* Enabled safecall for mips.
...
git-svn-id: trunk@26709 -
2014-02-07 14:12:33 +00:00
yury
73c26bd6be
* mipsel-android: Regenerated makefiles. From now the mipsel-android target can be built and used.
...
git-svn-id: trunk@26705 -
2014-02-07 12:37:17 +00:00
masta
2d2cab0e7a
Fix some internalerror codes in the ARM CG
...
git-svn-id: trunk@26701 -
2014-02-07 12:15:08 +00:00
florian
30352c7f7b
* fix several issues with loop strength reduction to make it working
...
* debugging code for strength reduction
git-svn-id: trunk@26694 -
2014-02-06 20:48:19 +00:00
florian
c5523fc780
* do not search a node tree which has been found being subject to cse further on
...
git-svn-id: trunk@26691 -
2014-02-06 19:27:11 +00:00
yury
bb269e53ac
* mipsel-android: Don't export local symbols from executable.
...
git-svn-id: trunk@26690 -
2014-02-06 19:11:08 +00:00
yury
56b3287e29
+ Added compiler support for mipsel-android target.
...
git-svn-id: trunk@26686 -
2014-02-06 17:02:43 +00:00
sergei
52af9a2c89
* Changed passing of hidden parameters to constructors of class-style objects: VMT is always passed in the first ('self') parameter, and the second one ('vmt', although this name is now misleading) contains flag specifying the constructor behavior and meaning of 'self'. Together with r26656 this removes methodpointer sharing between two parameter node trees, it becomes possible not to put methodpointer into temp, but use node tree below 'self' parameter to do virtual calls. This also matches behavior of Delphi.
...
git-svn-id: trunk@26683 -
2014-02-06 12:26:47 +00:00
florian
829764e96b
+ replace registers to spill in mov instructions and convert them into ldr/str
...
git-svn-id: trunk@26677 -
2014-02-05 18:19:41 +00:00
sergei
a1dfaa54dd
* Fixed exception handling in constructors of TP-style objects to correctly handle cases of statically allocated objects (must call destructor but do not free memory) and objects without destructor (must free memory if it was allocated dynamically).
...
+ Test extended.
git-svn-id: trunk@26676 -
2014-02-05 18:19:13 +00:00
Jonas Maebe
a1eb9a0f99
* fixed spilling of CMOVcc instruction: it "reads" operand two (in the sense
...
that the value of operand two is used/kept in case the condition is false)
(fixes mantis #25672 )
git-svn-id: trunk@26674 -
2014-02-05 00:27:21 +00:00
Jonas Maebe
ba5297be37
* support disabling the i386 peephole optimizer with -Oonopeephole
...
git-svn-id: trunk@26673 -
2014-02-05 00:27:16 +00:00
florian
9e4c130bc4
* do not allocate unnecessarily an extra pair of registers when multiplying int64s on arm
...
git-svn-id: trunk@26672 -
2014-02-04 22:02:51 +00:00
Jeppe Johansen
6861cbcf16
Allow FoldShiftLdrStr for all sizes of LDR/STR, and disable it for references that post/pre increment the base register on Thumb-2 targets.
...
git-svn-id: trunk@26671 -
2014-02-04 17:29:13 +00:00
masta
a72a3f4e01
Little cleanup after r26669, no functional changes
...
git-svn-id: trunk@26670 -
2014-02-04 08:04:08 +00:00
masta
80d2ee8ad0
Don't reuse registers on ARM 64 bits shift
...
git-svn-id: trunk@26669 -
2014-02-03 23:47:28 +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
sergei
0d3f36eebf
- Remove references to global variable 'cg' from methods of tcg and some of its descendants.
...
git-svn-id: trunk@26665 -
2014-02-03 12:27:48 +00:00
sergei
7104157a57
* Changed tabstractprocdef.address_size to return the def, which can be used to get other properties like size and alignment. Removes one of i8086 ifdef's.
...
git-svn-id: trunk@26664 -
2014-02-03 10:47:54 +00:00
sergei
53556f529d
* gen_alloc_symtable: don't use current_procinfo.procdef, the necessary procdef is passed in 'pd' parameter.
...
git-svn-id: trunk@26663 -
2014-02-03 10:21:56 +00:00
sergei
949907f1f3
* Don't emit "Temps allocated between..." comment in assembler listing if procedure has no temps.
...
git-svn-id: trunk@26660 -
2014-02-03 09:55:46 +00:00
sergei
e0082262cc
* Don't generate VMT checking code twice (gen_load_vmt_register generates it already).
...
git-svn-id: trunk@26657 -
2014-02-03 00:27:05 +00:00
sergei
a5d5ce8eb2
* TP-style object destructors do not need actual VMT in hidden parameter, a constant flag indicating need to free memory is sufficient.
...
* Destructor called from exception block in constructor must have this flag set in order to free memory.
+ Test.
git-svn-id: trunk@26656 -
2014-02-03 00:20:42 +00:00
Jonas Maebe
868b4f50e9
* use spilling_operation_type() instead of a big table to determine whether
...
instructions overwrite operand 0 (fixes wrongly handled rlwimi and some
others, and also adds support for loads/stores)
git-svn-id: trunk@26653 -
2014-02-02 15:32:54 +00:00
Jonas Maebe
de0ced1522
* A_INSLWI, A_INSLWI_, A_INSRWI, A_INSRWI_ also modify operand 0
...
git-svn-id: trunk@26652 -
2014-02-02 15:32:00 +00:00
Jonas Maebe
6a4afd3a33
* changed uses of "exit" in constructors to if/then constructs, to
...
avoid the constructor result/SSA bug in 2.6.x
git-svn-id: trunk@26651 -
2014-02-02 09:09:51 +00:00
Jonas Maebe
4e9c54278e
* the function result of constructors always is self, always is valid and is
...
not stored in procdef.funcretsym -> fix check so that SSA is not performed
on it in constructors when exit is used
git-svn-id: trunk@26650 -
2014-02-02 09:09:44 +00:00
florian
e6b68d19c8
* reordered decision how arguments for inlining are handled
...
* improved comments for inline argument handling
* replace arguments more aggressively with a copy of their original node tree when inlining
git-svn-id: trunk@26649 -
2014-02-01 22:26:23 +00:00
Jeppe Johansen
07b2982e77
Don't do ARM FoldShiftLdrStr peephole optimization if there's an offset in the reference.
...
Use UXTH+UXTB instructions instead of two shifts on processors that supports that.
Eliminate internalerror when constant pointers are typecast as arrays.
git-svn-id: trunk@26647 -
2014-02-01 13:29:35 +00:00
florian
2a7dcf6c7b
* formatting
...
git-svn-id: trunk@26646 -
2014-02-01 13:08:30 +00:00
florian
e3f9982ee1
* make_not_regable is a matter of code generation so do it in pass_1
...
git-svn-id: trunk@26645 -
2014-02-01 13:08:28 +00:00
florian
fbcfb63826
+ implement tcasenode.pass_typecheck
...
git-svn-id: trunk@26644 -
2014-02-01 13:08:26 +00:00
florian
d71bfe4c6f
* var parameters can be put in registers if the callee is inlined
...
git-svn-id: trunk@26643 -
2014-02-01 13:08:24 +00:00
florian
cd6f4d4469
* fix tsubscriptnode to handle left.location being an fpu or mm register as well.
...
git-svn-id: trunk@26642 -
2014-02-01 13:08:21 +00:00
masta
81517fdf70
Rerun peephole optimizers on the whole block
...
Up until now if a peephole optimizer matched we've only restarted from
the current instruction. This patch restarts optimizations on the whole
block if the previous run had at least one match.
As this can take considerable time this will only be enabled if -O3 or
higher is specified.
git-svn-id: trunk@26640 -
2014-01-31 23:21:52 +00:00
masta
3f8549365a
Don't schedule LDRD on ARM
...
The load scheduler does not handle LDRD correctly right now, but it does
not prevent A_LDR with PF_D set from beeing scheduled.
git-svn-id: trunk@26637 -
2014-01-30 21:53:03 +00:00
florian
28a8dc42c6
* fix tcgx86.a_op_reg_reg on x86-64 and make use of it
...
git-svn-id: trunk@26636 -
2014-01-30 20:24:41 +00:00
florian
7d7bf1d877
+ make use of SHLX/SHRX on CPUs supporting BMI2
...
git-svn-id: trunk@26635 -
2014-01-30 20:24:39 +00:00
florian
8fba876904
* apply cse to static symbols on x86-64 as well, if their address can be stored
...
git-svn-id: trunk@26634 -
2014-01-30 20:24:36 +00:00
florian
d8c0f11ff9
+ cs_userbp optimizer switch, so on x86-64 the compiler can make use of rbp if it is not needed as frame pointer
...
git-svn-id: trunk@26633 -
2014-01-30 19:44:17 +00:00