florian
6f03d04fe1
* when using a pointer as array, the pointer is never written, only read
...
git-svn-id: trunk@25964 -
2013-11-06 21:10:30 +00:00
florian
9fdd64e94c
* indention and new line fixes
...
git-svn-id: trunk@25963 -
2013-11-06 21:10:28 +00:00
florian
1a4584f4c6
+ dead store elimination, based on a patch by Jeppe Johansen
...
git-svn-id: trunk@25962 -
2013-11-06 21:10:26 +00:00
florian
aef0841fe4
* unified internalerror
...
git-svn-id: trunk@25961 -
2013-11-06 21:10:23 +00:00
florian
b928b1e9c9
* reorganized generic optimization switches
...
git-svn-id: trunk@25959 -
2013-11-06 21:10:17 +00:00
florian
e8787c4b48
+ constant propagation, based on a patch by Jeppe Johansen
...
git-svn-id: trunk@25958 -
2013-11-06 21:10:15 +00:00
florian
d39b9059d6
* improve simplification of arithmetic nodes, based on a patch by Jeppe Johansen
...
git-svn-id: trunk@25957 -
2013-11-06 21:10:13 +00:00
Jonas Maebe
3ed60082d3
* don't generate typed constant initialisers for set and enum constants
...
declared local to functions on the JVM target, because we don't generate
field constants for them (fixes run time error when declaring a symbolic
enum/set constant in a function on the JVM target)
git-svn-id: trunk@25953 -
2013-11-06 16:10:58 +00:00
Jonas Maebe
3c7ad95f7d
* simplified RegInInstruction() and fixed range errors
...
git-svn-id: trunk@25950 -
2013-11-06 10:46:22 +00:00
Jonas Maebe
98a230d20f
* don't call swapendian for shortint (it's 1 byte -> upcast to word and then
...
swapped, which is wrong)
git-svn-id: trunk@25949 -
2013-11-06 09:44:29 +00:00
Károly Balogh
628149d923
support label offsets for ARM like GAS, allows things like ADR r4, .label + 256
...
git-svn-id: trunk@25938 -
2013-11-05 18:10:54 +00:00
Károly Balogh
b67e4fb8b3
added the ADR ARM pseudo instruction to instruction list
...
git-svn-id: trunk@25936 -
2013-11-05 13:16:33 +00:00
florian
b147693cc5
* comment updated
...
git-svn-id: trunk@25913 -
2013-11-01 20:22:46 +00:00
florian
1843ed59b5
* set p to a valid instruction
...
git-svn-id: trunk@25912 -
2013-11-01 20:09:28 +00:00
florian
ce9398f8d8
* do not reuse register on x86 either
...
git-svn-id: trunk@25911 -
2013-11-01 20:08:30 +00:00
florian
f132a804d6
+ handle 32 bit references on x86-64 so lea can be used for 32 bit arithmetics
...
git-svn-id: trunk@25909 -
2013-11-01 19:01:39 +00:00
florian
7fc1d70e49
* do reg2=reg1*const by lea if possible
...
git-svn-id: trunk@25908 -
2013-11-01 19:01:36 +00:00
florian
a16ceb6cdf
* replace lea by add if possible
...
git-svn-id: trunk@25907 -
2013-11-01 19:01:33 +00:00
florian
80f8f66c6e
* set file positions correctly in PeepHoleOptPass1
...
git-svn-id: trunk@25906 -
2013-11-01 19:01:31 +00:00
florian
4148637c8c
* fold mov/lea/mov as well if possible
...
git-svn-id: trunk@25905 -
2013-11-01 19:01:29 +00:00
florian
524cde8140
+ MatchReference
...
* refactored some code
git-svn-id: trunk@25904 -
2013-11-01 19:01:26 +00:00
florian
440cb33e80
* continue to use lea to adjust the stack pointer, it is the recommended way
...
git-svn-id: trunk@25903 -
2013-11-01 19:01:24 +00:00
florian
5eb578a44c
* generate sub instead of add from lea if appropriate
...
git-svn-id: trunk@25902 -
2013-11-01 19:01:22 +00:00
florian
f56d2d4b09
* be able to replace lea by add when spilling
...
git-svn-id: trunk@25901 -
2013-11-01 19:01:20 +00:00
florian
d575a435c3
* some debugging infrastructure
...
git-svn-id: trunk@25900 -
2013-11-01 19:01:17 +00:00
florian
bfbb0c5b9d
* optimize mov/lea
...
git-svn-id: trunk@25899 -
2013-11-01 19:01:14 +00:00
florian
3c58cad96b
* make use of lea if possible
...
git-svn-id: trunk@25898 -
2013-11-01 19:01:11 +00:00
florian
945b318012
+ get rid of unnecessary 64 bit conversions too if one of the operands is 8 or 16 bit
...
git-svn-id: trunk@25897 -
2013-11-01 19:01:09 +00:00
florian
d201bcb1cd
* get rid of 64 bit operations on 64 bit targets as well if possible
...
git-svn-id: trunk@25896 -
2013-11-01 19:01:06 +00:00
florian
c8743c4826
* support 32 bit operations on x86-64 in the code generator
...
git-svn-id: trunk@25895 -
2013-11-01 19:01:02 +00:00
Jonas Maebe
7b97752d0b
- removed commented out duplicate thlcg.getmmregister()
...
git-svn-id: trunk@25887 -
2013-10-31 12:30:53 +00:00
nickysn
8bfe2a56dd
* optimized SAR by 31 to use only one SAR instruction in tcg8086.a_op_const_reg
...
git-svn-id: trunk@25883 -
2013-10-30 16:53:59 +00:00
nickysn
f288859fba
* i386 optimization - remove the test/or %y, %y instruction in the sequence:
...
shl/sal/shr/sar $x, %y
test/or %y, %y
jz/jnz/setz/setnz/cmovz/cmovnz ...
git-svn-id: trunk@25881 -
2013-10-29 17:34:32 +00:00
sergei
66e82f1655
+ i386: generate optimized code for 64-bit arithmetic shifts by constant amount. Shifts by 63 and by less than 32 take just two instructions, shifts by 32..62 bits are done with 3 instructions.
...
git-svn-id: trunk@25880 -
2013-10-29 16:10:13 +00:00
sergei
486a7ef81e
* tx86inlinenode.second_popcnt: use emit_ref_reg instead of appending instruction directly, this provides proper PIC handling of the reference. emit_reg_reg part is not strictly necessary, but done for consistency.
...
git-svn-id: trunk@25878 -
2013-10-28 16:40:42 +00:00
sergei
6a08ca3f0b
* tmoddivnode.firstoptimize improvements/fixes:
...
* Fixed misplaced parentheses, which were preventing optimization of "unsigned mod power_of_two" into "and" expressions.
* Handling "signed div power_of_two": properly delete the temp node, removes warnings when compiled with "-dEXTDEBUG". This however requires another temp node for storing the result.
* Replaced direct calls to "fpc_sarint64" with inline nodes (in_sar_x_y), allowing target-specific optimizations to take place.
git-svn-id: trunk@25877 -
2013-10-28 15:55:13 +00:00
sergei
9ad98a2c4d
* Handle "SarInt64" always as internal procedure, introduced virtual method tinlinenode.first_sar that by default converts it into call to "fpc_sarint64" unless target CPU is 64-bit. This provides a point to insert target-specific optimizations.
...
git-svn-id: trunk@25876 -
2013-10-28 14:31:36 +00:00
nickysn
12b1e0cbfd
+ tell wlink to add dwarf debug info to the executable when -gw2/3/4 is used
...
git-svn-id: trunk@25874 -
2013-10-27 20:30:00 +00:00
nickysn
9f979eb5c6
* put the i8086-msdos dwarf debug sections in USE32 class=DWARF segments because
...
wlink wants them this way
git-svn-id: trunk@25873 -
2013-10-27 20:28:43 +00:00
nickysn
93a706f1a0
+ allow smartlinking and dwarf debug info at the same time for i8086-msdos
...
git-svn-id: trunk@25872 -
2013-10-27 20:26:34 +00:00
nickysn
90a092e585
+ added enum Tdwarf_addr with the values of DW_AT_address_class (to be used for
...
the i8086-msdos debug info)
git-svn-id: trunk@25871 -
2013-10-27 18:40:59 +00:00
Jonas Maebe
c693a91e18
* fixed compilation after r25847 (mantis #25237 )
...
git-svn-id: trunk@25870 -
2013-10-27 17:35:04 +00:00
Jonas Maebe
353c15fb34
* fixed size of temporary register used to evaluate smallset<=/>=smallset
...
git-svn-id: trunk@25869 -
2013-10-27 17:34:59 +00:00
florian
17dcd2fa31
* get rid of unneeded 64 bit multiplications, it makes also for signed operations no difference if a calculation is carried out with 32 or 64 bit, if the result is casted to 32 bin again
...
git-svn-id: trunk@25868 -
2013-10-27 16:47:37 +00:00
florian
0eeb3e8d49
* check if the pointer is really assigned when trying to remove unneeded jumps
...
git-svn-id: trunk@25867 -
2013-10-27 16:47:34 +00:00
nickysn
e6a4435330
+ support the aitconst_XXbit_unaligned const types in the NASM asm writer. This
...
fixes DWARF support when using NASM.
git-svn-id: trunk@25866 -
2013-10-27 15:21:30 +00:00
paul
d16606b04c
compiler: revert r25852 since 10.9 is already handled
...
git-svn-id: trunk@25864 -
2013-10-27 14:17:29 +00:00
sergei
fbf6192aff
* tmipsaddnode.second_addfloat: don't bother reusing locations, always allocate a new register for result.
...
git-svn-id: trunk@25857 -
2013-10-26 18:15:24 +00:00
sergei
dd472dbfb0
* MIPS: when converting int to real, use a floating point constant directly, instead of emulating it with integers. tai_real_64bit already handles all endian issues.
...
git-svn-id: trunk@25856 -
2013-10-26 18:12:25 +00:00
sergei
40239e8bcc
* Elaborating removal of branches with delay slots: ignore reg. deallocations that are inserted by RA between branch and its delay slot instruction.
...
* Also skip possible ait_marker's between branch and its immediately following target (which was preventing certain optimizations of "exit" statements on all targets because procedure's exit label is always preceded by location marker).
git-svn-id: trunk@25855 -
2013-10-26 17:45:01 +00:00