Károly Balogh
5e15e4b07d
add basic constant handling to subscript nodes, avoid ie20060521 when building rgobj.pas with -O3/-O4
...
git-svn-id: trunk@26532 -
2014-01-20 12:00:48 +00:00
sergei
ca58cc1d64
+ x86_64: generate position-independent case jump tables (twice smaller than absolute ones and do not require dynamic relocations in .dll/.so).
...
git-svn-id: trunk@26519 -
2014-01-19 15:41:05 +00:00
paul
eb508a18e9
compiler: remove RST writer
...
git-svn-id: trunk@26518 -
2014-01-19 04:40:41 +00:00
sergei
6b1f021fcf
- Removed remaining optimizations that duplicate functionality of tcg.optimize_op_const.
...
- Don't call make_simple_ref if operation will be optimized away or replaced with another one, which calls make_simple_ref itself.
git-svn-id: trunk@26515 -
2014-01-19 01:19:01 +00:00
nickysn
c83032992d
* more fixes to the 3-op IMUL spilling:
...
o Return the correct operation type for all forms of IMUL in
taicpu.spilling_get_operation_type
o Properly support 3-op IMUL in trgx86.do_spill_replace
git-svn-id: trunk@26514 -
2014-01-18 21:46:13 +00:00
florian
a752e3542d
+ more x86 cpu flags
...
git-svn-id: trunk@26513 -
2014-01-18 21:03:09 +00:00
sergei
e6a9f3b15b
* Fixed spilling of 3-operand IMUL instruction (went unnoticed this far because such instructions were not emitted by compiler).
...
git-svn-id: trunk@26510 -
2014-01-18 19:21:48 +00:00
nickysn
1f7b14f38e
* fixed the conversion of powerof2 mul/imuls to lea in tcgx86.a_op_const_reg_reg
...
git-svn-id: trunk@26509 -
2014-01-18 17:58:31 +00:00
nickysn
cc1faad3d2
+ make use of the 3-operand form of IMUL on i386 and x86_64
...
git-svn-id: trunk@26508 -
2014-01-18 17:04:57 +00:00
nickysn
1de847c754
* fixed error in comment
...
git-svn-id: trunk@26507 -
2014-01-18 17:00:10 +00:00
florian
7028210817
+ tzcnt assembler instruction
...
git-svn-id: trunk@26506 -
2014-01-18 12:11:50 +00:00
sergei
3a3197ae9c
+ i386: inline 64-bit multiplications if overflow checking is disabled and not optimizing for size. Rough testing on Core 2 Duo shows speed improvement by factor of 5, even despite inlined code does not check for zero upper dwords.
...
git-svn-id: trunk@26504 -
2014-01-18 11:41:55 +00:00
florian
2a2184bc40
* regenerated makefiles affected by the last change
...
git-svn-id: trunk@26503 -
2014-01-18 10:21:41 +00:00
florian
fd5fa95416
+ OPTNEW Makefile parameter: when running a native cycle, this allows to pass a parameter only to the new generated compiler
...
git-svn-id: trunk@26501 -
2014-01-18 10:19:16 +00:00
sergei
a3efd9e1df
+ Added method taddnode.use_generic_mul64bit, allowing it to inline full 64-bit multiplications, and fixed ARM to comply (it was not checking for possible 32x32 to 64 optimization after detecting a 64-bit operand, so recently added code for 32x32 to 64 bit optimization was inactive).
...
git-svn-id: trunk@26500 -
2014-01-18 09:59:59 +00:00
nickysn
2459518bdd
* use IMUL even for unsigned multiplication on x86_64, when overflow checking is
...
off
git-svn-id: trunk@26499 -
2014-01-18 03:36:15 +00:00
nickysn
5d75bf4f92
* always use IMUL instead of MUL on i386, when doing a 32->32 multiplication
...
without overflow checking
git-svn-id: trunk@26498 -
2014-01-18 02:56:51 +00:00
nickysn
2602f379d7
* fixes in the 16 to 32-bit multiplication in ti8086addnode.second_mul
...
git-svn-id: trunk@26497 -
2014-01-18 00:38:46 +00:00
nickysn
3f4111ac37
* emit MUL instead of IMUL in ti8086addnode.second_mul when overflow checking is
...
off and the multiplication is 16->16
git-svn-id: trunk@26495 -
2014-01-17 23:04:46 +00:00
nickysn
529008e031
* emit MUL (when overflow checking is off), instead of IMUL for OP_IMUL in
...
tcg8086.a_op_const_reg, when the target CPU is 8086/8088, because it's
supposed to be faster on these processors, according to Intel's instruction
timings.
git-svn-id: trunk@26493 -
2014-01-17 21:23:42 +00:00
sergei
6168f563c2
* x86 compares: compare references with constants directly (without loading to register) if possible, this helps to reduce register pressure.
...
git-svn-id: trunk@26492 -
2014-01-17 19:42:09 +00:00
nickysn
820b667e1b
- rm the OP_IMUL to SHL optimization from tcgx86.a_op_const_reg and tcgx86.a_op_const_ref, because it's already done in optimize_op_const, which is called in the beginning of both methods.
...
git-svn-id: trunk@26491 -
2014-01-17 18:34:13 +00:00
nickysn
767a0f1187
- rm TODO comment about the IMUL optimization with SHL from
...
tcg8086.a_op_const_reg, since that optimization is already done in
optimize_op_const, which is called earlier in the same method.
git-svn-id: trunk@26488 -
2014-01-17 10:28:30 +00:00
nickysn
1a846e7c71
- rm TODO comment for overflow checking from tcg8086.a_op_const_reg, since
...
overflow checking should not be implemented there. It should only leave the
flags in place for the jo instruction, which the IMUL instruction already
does.
git-svn-id: trunk@26487 -
2014-01-17 10:26:20 +00:00
florian
e210d5f30e
+ cpu_capabilites for x86_64 and i386
...
* take advantage of bmi2 instruction rorx
git-svn-id: trunk@26482 -
2014-01-16 21:47:28 +00:00
sergei
75894722d4
* Factored a reusable piece of code into separate method.
...
git-svn-id: trunk@26481 -
2014-01-16 16:43:06 +00:00
paul
e7636cd6e6
compiler: fix a bug in .rsj output and enable it by default
...
git-svn-id: trunk@26478 -
2014-01-16 13:57:08 +00:00
paul
3aec5da7a7
compiler: use widestrings for json resource file generation
...
git-svn-id: trunk@26477 -
2014-01-16 12:07:26 +00:00
paul
3bd53b9658
compiler: add a method for generating json files for resource strings (for experiments only now)
...
git-svn-id: trunk@26475 -
2014-01-16 09:26:53 +00:00
Jonas Maebe
8065fc24d9
* fixed indentation of stack slot allocation debug statements
...
git-svn-id: trunk@26474 -
2014-01-15 20:36:59 +00:00
Jonas Maebe
2518c526c7
* always use a new register for array indices modified by a constant,
...
improves register/stack allocation
git-svn-id: trunk@26473 -
2014-01-15 20:36:56 +00:00
Jonas Maebe
a5653916e0
* convert array indices always to s32int, because that is the index type used
...
by java arrays (otherwise we may get unwanted sign extensions after
performing e.g. an s16bit operation, see the test)
git-svn-id: trunk@26472 -
2014-01-15 20:36:52 +00:00
Jonas Maebe
67413a2823
* fixed skpara setter of tprocdef after r26332
...
git-svn-id: trunk@26471 -
2014-01-15 20:36:49 +00:00
sergei
c673c32ad9
+ SPARC: generate position-independent case jump tables, as specified by ABI.
...
Generate them also for non-PIC mode: absolute code is just 2 instructions shorter, trying to save them is probably not worth the effort.
git-svn-id: trunk@26468 -
2014-01-15 15:31:53 +00:00
Károly Balogh
b398430b4c
* get_volatile_registers* now defines proper volatile register range for all cases using the pre-defined values
...
* removed the two huge and ugly case switches while parsing Amiga-specific paralocs, using a simple unified function now
git-svn-id: trunk@26466 -
2014-01-15 02:49:03 +00:00
Károly Balogh
587acf6452
fix infinite spilling on m68k, patch by Florian, additional IE workaround by me, based on a similar hack in the ARM cg...
...
git-svn-id: trunk@26465 -
2014-01-15 02:09:02 +00:00
Károly Balogh
70f9b098e0
no longer define a segment field for m68k
...
git-svn-id: trunk@26464 -
2014-01-15 02:06:10 +00:00
Károly Balogh
80b253c111
be consistent in naming. renamed VOLATILE_ADDRESSREGISTER to VOLATILE_ADDRESSREGISTERS
...
git-svn-id: trunk@26463 -
2014-01-15 01:31:41 +00:00
Károly Balogh
b37ebeaabd
disabled a_loadaddr_ref_cgpara() for m68k, this code was copy-pasted from x86 probably and could never work properly as it is
...
git-svn-id: trunk@26462 -
2014-01-15 01:27:02 +00:00
pierre
2a6e592fba
Handle link map for msdos wlink
...
git-svn-id: trunk@26461 -
2014-01-14 21:40:02 +00:00
Jonas Maebe
ca446b4b2a
- removed registration of x86_6432 target because it's not supported in any
...
way by the compiler (and furthermore it would have to be registerd in an
the x86_64 compiler binary, not an i386 one) (mantis #25525 )
git-svn-id: trunk@26460 -
2014-01-14 20:37:18 +00:00
Jonas Maebe
5fc4af09dd
* don't crash when searching for a type helper in an anonymous array (or
...
other non-record/objectdef-based) type (mantis #25504 )
git-svn-id: trunk@26459 -
2014-01-14 19:52:20 +00:00
Jeppe Johansen
123742647c
Fixed problem in estimation of stack size for thumb targets. Types passed by value were not handled properly.
...
git-svn-id: trunk@26458 -
2014-01-14 19:27:15 +00:00
masta
fb52392e20
Reformat and comment is_thumb32_imm
...
I've just regrouped the conditions a bit for easier understanding. No
functional changes.
git-svn-id: trunk@26449 -
2014-01-13 21:32:28 +00:00
masta
3ab665e554
Try to split constant XORs into two shiftimms on ARM.
...
git-svn-id: trunk@26448 -
2014-01-13 21:32:24 +00:00
nickysn
aec73bce68
* pass the overflow check flag correctly to the 32 and 16-bit mul helpers (on
...
i8086 and AVR) according to whether overflow checking is enabled (instead of
always passing 'false')
git-svn-id: trunk@26445 -
2014-01-13 00:45:12 +00:00
pierre
291124489f
Use scripted version of wlib for go32v2 msdos smart library creation
...
git-svn-id: trunk@26444 -
2014-01-12 23:21:16 +00:00
pierre
e87e2f9c30
Print out command line before running it with -vx option
...
git-svn-id: trunk@26443 -
2014-01-12 23:06:19 +00:00
pierre
bef22b2a6f
Add scripted version of wlib call for msdos
...
git-svn-id: trunk@26442 -
2014-01-12 22:47:27 +00:00
florian
fe7238bdf1
* avoid compiler warning about uninitialized variable
...
git-svn-id: trunk@26441 -
2014-01-12 21:21:56 +00:00