Commit Graph

715 Commits

Author SHA1 Message Date
Jonas Maebe
592df7fa59 * disable cs_opt_regvar on all platforms when compiled for LLVM (LLVM does
that itself, our LLVM code generator can't handle it, and if it did then
    afterwards we would have to spill 90% of those register variables again
    to make them SSA)

git-svn-id: trunk@44062 -
2020-01-29 22:21:07 +00:00
florian
b7c6e01b03 * cleaning up tcgsize: it makes no sense to declare every combination and type
the different vector types must be either handled in the high level cg or
    by using the shuffle parameter

git-svn-id: trunk@43860 -
2020-01-04 21:54:53 +00:00
Jonas Maebe
1e3f72403e * renamed getintparaloc to getcgtempparaloc
o it can be used for more than integer parameters

git-svn-id: trunk@43781 -
2019-12-24 22:12:25 +00:00
florian
e1e8986462 * patch by J. Gareth Moreton, issue #36271, part 3: support for the other architectures
git-svn-id: trunk@43441 -
2019-11-10 16:11:40 +00:00
pierre
7d12e8cc6d Avoid warnings for m68k compiler
git-svn-id: trunk@43391 -
2019-11-05 10:00:48 +00:00
pierre
1bed61195e Fix m68k errors with -CriotR option
git-svn-id: trunk@43165 -
2019-10-10 21:57:07 +00:00
Károly Balogh
eb71d11b99 m68k: also handle OS_64 register sizes in cgsize2subreg
git-svn-id: trunk@43045 -
2019-09-20 13:48:30 +00:00
Károly Balogh
435b57bdb1 m68k: allow vecnode to use word size index registers
git-svn-id: trunk@43044 -
2019-09-20 11:37:18 +00:00
Károly Balogh
19a6964088 m68k: add subregisters. on 68k, these are not as universal as on x86 and work differently, but the compiler needs this infrastructure to do 16bit math (which is a massive improvement on '000) or word-size indexes on CPUs which support it
git-svn-id: trunk@43043 -
2019-09-20 11:35:35 +00:00
Károly Balogh
aea0f3e667 m68k: build fix (premature commits are the root of all evil too)
git-svn-id: trunk@42966 -
2019-09-09 07:47:34 +00:00
Károly Balogh
d25820b830 m68k: added CPUM68K_HAS_BYTEWORDMATH and CPUM68K_HAS_INDEXWORD capabilities
git-svn-id: trunk@42964 -
2019-09-08 22:43:34 +00:00
Károly Balogh
353fc13257 m68k: cleanup of the ancient mess from cgsize2subreg
git-svn-id: trunk@42949 -
2019-09-08 13:55:19 +00:00
Károly Balogh
fa1203029f m68k: use cpu_capabilities when deciding to inject scaling into a ref. also allow scaling in more cases.
git-svn-id: trunk@42947 -
2019-09-08 13:37:22 +00:00
Károly Balogh
50fe8f70f5 m68k: make sure we're not trying to allocate a subregister for float paras when R_SUBWHOLE <> R_SUBNONE
git-svn-id: trunk@42946 -
2019-09-08 13:34:39 +00:00
Károly Balogh
16fc8c8d9a m68k: added some handling for the explicit precision FPU instructions in the spilling and optimizer. fixed a_fsabs and a_fdabs names
git-svn-id: trunk@42943 -
2019-09-08 09:21:17 +00:00
Károly Balogh
fd1d227175 m68k: more refactoring for fpu_capabilities instead of hardwired fpu types. 68040 and 68060 fpu types should now work
git-svn-id: trunk@42929 -
2019-09-06 07:56:06 +00:00
Károly Balogh
db2875ceba m68k: added the remaining instructions with explicit rounding precision. fixed fsflmul to be fsglmul (this is also typo in the original 68k PRM)
git-svn-id: trunk@42928 -
2019-09-06 07:25:45 +00:00
Károly Balogh
2a87b885b1 m68k: added the most important FPU instructions with explicit rounding precision (eg. FSADD/FDADD)
git-svn-id: trunk@42927 -
2019-09-05 21:51:36 +00:00
Károly Balogh
5eee29e5d1 m68k: refactor some code to not fail when the tasmop set will be bigger than 256 elements
git-svn-id: trunk@42926 -
2019-09-05 21:49:27 +00:00
Károly Balogh
de095c4631 m68k: refactoring to use fpu_capabilities at more places instead of hardwiring certain fpu types
git-svn-id: trunk@42925 -
2019-09-05 21:43:51 +00:00
Károly Balogh
36286441b2 m68k: try to optimize realconst operands into B/W/L sized integer operands. these are shorter to encode - which almost always means faster on m68k
git-svn-id: trunk@42923 -
2019-09-05 19:32:57 +00:00
florian
69786ffe73 somehow committing went wrong, second part of last commit:
+ AArch64: support for vX.8b/vX.16b register names
+ support for more than 256 registers in the register dat files
- removed totherregisterset
+ AArch64: use vmov to load immediates if possible
+ AArch64: use eor to clear mm registers

git-svn-id: trunk@42917 -
2019-09-03 21:07:33 +00:00
Károly Balogh
0ef47f6426 m68k: tabs 2 spaces, no functional changes
git-svn-id: trunk@42829 -
2019-08-26 13:08:39 +00:00
Károly Balogh
d29f44e1c7 m68k: rework of the inline nodes to use fpu_capabilities. added fast path for round/trunc (enabled for fastmath only)
git-svn-id: trunk@42814 -
2019-08-25 12:12:15 +00:00
Károly Balogh
3662afe93b m68k: added more cpu capabilities. changed the CG at a few places to actually use them
git-svn-id: trunk@42763 -
2019-08-22 15:38:08 +00:00
Károly Balogh
4936358bee m68k: fpu capabilities support
git-svn-id: trunk@42739 -
2019-08-19 15:07:22 +00:00
Károly Balogh
90bab63e51 m68k/vasm: remove bits of Linux support. this combination has never really been tested or supported, and got broken recently. m68k-elf-linux has good enough GNU binutils anyway
git-svn-id: trunk@42597 -
2019-08-07 09:04:57 +00:00
Jonas Maebe
ce598c15ec * factored out the conditions under which add nodes need to perform
overflow checks
   o in particular ensure that cpu-specific overrides don't perform overflow
     checks when nf_internal is set

git-svn-id: trunk@42573 -
2019-08-03 12:19:50 +00:00
Jonas Maebe
3fee990218 * on Mach-O, PECOFF and ELF platforms, write local symbols as hidden/
private_extern (or plain global in case of PECOFF, as the effect is
    the same there): visible across object files, but they become local
    when linked into a binary/library. This enables cross-unit inlining
    of functions accessig implementation-only symbols.

git-svn-id: trunk@42340 -
2019-07-07 21:33:43 +00:00
pierre
828a248287 Systematically include fpcdefs.inc at sart of all units used by compiler
git-svn-id: trunk@42322 -
2019-07-03 13:35:05 +00:00
Jonas Maebe
a0e35fd1bc * synchronised with trunk till r42118
git-svn-id: branches/debug_eh@42119 -
2019-05-25 13:19:06 +00:00
Jonas Maebe
77658b925b * disable regular array -> dynamic array type coversion support unless
{$modeswitch arraytodynarray} is active (mantis #35576)
   o changed compiler to compile without this modeswitch
   o added the modeswitch to a test that depends on it

git-svn-id: trunk@42118 -
2019-05-25 12:31:32 +00:00
Jonas Maebe
a7bd37d17a * synchronised with trunk till r40776
git-svn-id: branches/debug_eh@41867 -
2019-04-13 15:16:09 +00:00
Károly Balogh
5358851f84 * clean up some things regarding explicit paraloc handling. this should fix m68k-amiga and powerpc-morphos builds after r41716
git-svn-id: trunk@41730 -
2019-03-18 01:19:18 +00:00
Jonas Maebe
ac883969a9 * synchronised with trunk till r41423
git-svn-id: branches/debug_eh@41424 -
2019-02-23 17:08:03 +00:00
Jonas Maebe
8b9e90dc7a * keep track of whether a routine has a C-style variadic parameter in the
procoptions even when it's through an array-of-const parameter
  * always call create_varargs_paraloc_info() instead of create_paraloc_info()
    in the former case, even when no varargs parameters are specified (because
    on some platforms even some non-variadic parameters need to be passed
    differently, such as on ARM with gnueabihf)

git-svn-id: trunk@41420 -
2019-02-23 15:42:45 +00:00
Jonas Maebe
882d676bc9 * synchronised with trunk till r40635
git-svn-id: branches/debug_eh@40636 -
2018-12-24 22:12:19 +00:00
Jonas Maebe
acf02ab64b * when creating wrappers, add a prefix to parameter names to prevent them
hiding the method name of the wrapped routine
   o also add a few more '&' prefixes to the generated wrapper code to
     prevent issues when keywords are used as identifiers

git-svn-id: trunk@40634 -
2018-12-24 22:10:06 +00:00
Jonas Maebe
9630eb7ce9 * synchronised with trunk till r40466
git-svn-id: branches/debug_eh@40467 -
2018-12-04 19:54:31 +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
Károly Balogh
6629e72d79 m68k: reinstate the inc/dec tempregister type hack again in an isolated way (it was removed in r40385, as it was breaking llvm target)
git-svn-id: trunk@40453 -
2018-12-02 18:54:04 +00:00
Jonas Maebe
4cd6f59bc3 * changed create_hlcodegen into a procvar, so that we don't have to insert
hlcgllvm in the uses clause of every unit that calls create_hlcodegen
   o prevents dependency cycles that can cause llvm codegen units to init
     before the cpu variants, which is bad since the llvm versions have to
     override the cpu variants in their init code (+ added checks in the
     init code that they are in fact initialised later)

git-svn-id: branches/debug_eh@40410 -
2018-11-29 21:31:15 +00:00
Jonas Maebe
bfc7c58a69 * synchronised with trunk till r40348
git-svn-id: branches/debug_eh@40349 -
2018-11-18 12:01:50 +00:00
pierre
2761448f44 * Disable range check for m68k/aoptcpu unit
* Add missing change of var parameter p to next instruction
    in TryToOptimizeMove method after instruction removal.

git-svn-id: trunk@40324 -
2018-11-16 10:27:42 +00:00
pierre
53a27fe7b3 Disable range check in m68k:tiscv32 and riscv64 cgcpu units
git-svn-id: trunk@40319 -
2018-11-15 16:58:40 +00:00
florian
9b0ff05ee8 - get rid of MaxOps, it is redundant with max_operands
* MatchOpType with three operands is only available of max_operands>2

git-svn-id: trunk@40190 -
2018-11-02 21:32:29 +00:00
pierre
96460b70b2 Remove another wrong typecast when testing that a tai is an instruction
git-svn-id: trunk@40131 -
2018-11-01 07:01:02 +00:00
pierre
a015c779ff Remove unneeded typecasts in TryTOptimizeMove
git-svn-id: trunk@40123 -
2018-10-31 23:19:39 +00:00
Jonas Maebe
8555ec1438 + fpc_eh_return_data_regno() intrinsic to get the return register numbers
for the Dwarf EH exception handler result

git-svn-id: branches/debug_eh@40070 -
2018-10-28 18:16:38 +00:00
pierre
0bcf9a51d9 Avoid range check error when compiled with -CR
git-svn-id: trunk@40000 -
2018-10-20 18:49:53 +00:00