Commit Graph

791 Commits

Author SHA1 Message Date
Karoly Balogh
459dc68ab9 m68k: more boiler plate and refactor for a future internal assembler 2023-01-05 13:32:34 +01:00
Karoly Balogh
f2d6b4d530 m68k: added a helper function to check if a register is an FPU register 2023-01-05 13:32:33 +01:00
Karoly Balogh
721e988da2 m68k: add some initial CPU-specifc boilerplate for an internal ELF writer 2022-12-29 05:08:46 +01:00
Karoly Balogh
e19f60503b m68k: updated instruction tables to match vasm release 1.9a 2022-12-29 03:36:51 +01:00
Karoly Balogh
92e5ede347 m68k: fixed the capabilities flags inverted logic issues committed in 7d23c2e9 2022-08-30 10:42:26 +02:00
Karoly Balogh
832b566097 m68k: add a CPU capability to signal the CPU has no 48 bit encodiing limits 2022-08-26 18:42:24 +02:00
Karoly Balogh
6c67798272 m68k: disable an A_MOVE in the spilling code in an effort to finally try to unbreak paszlib 2022-08-26 18:42:24 +02:00
Karoly Balogh
7d23c2e9d0 m68k: use CPU capabilities at places instead of hardwiring cpu_coldfire 2022-08-26 18:42:24 +02:00
Sven/Sarah Barth
7f3a5eb9ab * extend tabstractprocdef.getcopyas by a parameter to control whether the copy should be registered or not 2022-05-26 21:42:59 +02:00
Karoly Balogh
57107c3310 m68k: opcode table updates based on vasm 1.9 (used with permission) 2022-04-05 12:07:49 +02:00
Karoly Balogh
59c33d69ab Revert "m68k: utilize cg.a_loadaddr_ref_cgpara in hlcgcpu" for now, turns out it's not needed 2022-03-24 09:48:25 +01:00
Karoly Balogh
ed520548be m68k: utilize cg.a_loadaddr_ref_cgpara in hlcgcpu, as m68k has an instruction for loading addresses directly to the stack (PEA), and the default implementation of hlcg.a_loadaddr_ref_cgpara doesn't use that code path 2022-03-23 11:06:18 +01:00
Karoly Balogh
22eb1e099f * m68k: make sure right is in an address register for muln,addn,orn,xorn, before calling the low level cg 2022-03-22 09:02:31 +01:00
Karoly Balogh
be2c1c751d * m68k: fixed the register save/restore for larger than 32K stackframes on subarchs which has no long displacement, to not trash register A0 2022-03-12 21:22:42 +01:00
Karoly Balogh
0600287c63 * m68k: spilling read, write, and replace is now bound to CPU capabilities instead of CPU family. This probably fixes some issues on 68000, where spilling replacement was not respecting CPU displacement handling boundaries, leading to assembler errors. 2022-03-11 16:03:21 +01:00
florian
27fb9086aa * cleanup: cs_opt_loopunroll is a generic optimization for a long time already 2022-03-08 23:03:18 +01:00
Karoly Balogh
554ae218ca * m68k: fix an endless syntax error loop in the assembler reader 2022-03-06 22:03:01 +01:00
Karoly Balogh
10191477ae * m68k: allow vasm to be used for system_m68k_embedded target, simplify some code 2022-03-05 17:59:15 +01:00
Karoly Balogh
077a3f1892 * m68k: don't attempt to copy less than 1 byte in g_concatcopy, this fixes tdfa7.pp on 68000 and removes some superfluous address processing on 68020+ in the same test 2022-02-08 03:04:28 +01:00
Karoly Balogh
8f083f6342 * m68k: do not generate unnecessary unaligned load sequences for byte loads into registers, this fixes tcnvint1 test on plain 68000 2022-02-08 01:26:28 +01:00
Karoly Balogh
06da0b3db6 * fix m68k IE after e9acd759, patch by Yuriy Sydorov 2021-12-13 16:14:59 +01:00
florian
6404478ea4 * cleanup of VER3_0 defines 2021-11-17 22:19:57 +01:00
florian
ff3acfb8cd * cleanup of 2.7.0 defines 2021-10-31 13:20:28 +01:00
Károly Balogh
cdc7fec019 m68k: D2 is considered volatile on macosclassic
git-svn-id: trunk@49294 -
2021-04-29 22:06:26 +00:00
Károly Balogh
d06cb1a20a m68k: fixed a comment. no functional change
git-svn-id: trunk@49275 -
2021-04-27 06:25:13 +00:00
Károly Balogh
2a7aa11163 m68k: added support to references like (a0,d0.w) in inline assembly, also fixed a bug, where sometimes the index register would have been randomly set as smaller than .l size, when the size wasn't specified
git-svn-id: trunk@49233 -
2021-04-19 09:13:02 +00:00
Károly Balogh
665180a579 m68k: always use ELF objects with vasm for improved cross-compatibility with other tools and compilers
git-svn-id: trunk@49210 -
2021-04-16 11:42:04 +00:00
Károly Balogh
b5216a1990 m68k: on the Sinclair QL insert the main program's name into the object, so the RTL later can set it as default job name
git-svn-id: trunk@49189 -
2021-04-12 11:51:12 +00:00
Károly Balogh
c8e712f400 m68k: cleaned up some ancient mess from cpunode.pas, no significant functional change, apart from unit inclusion order
git-svn-id: trunk@49187 -
2021-04-12 09:33:51 +00:00
Károly Balogh
2703b36fe1 m68k: removed some helper function which was added, but in the end it never saw any use
git-svn-id: trunk@48798 -
2021-02-24 09:10:40 +00:00
Károly Balogh
2ffe777b44 m68k: extend the the register to full size, when multiplied by an immediate in memory references. Patch based on the work of Pierre Muller.
git-svn-id: trunk@48732 -
2021-02-20 11:21:14 +00:00
Károly Balogh
ada3d2050c m68k: write inline floating point immediates as hex consts, instead of scientific notation. the scientific notation format parsing depends on the libc the assembler was linked against, which can lead to varying results and compile errors
git-svn-id: trunk@48524 -
2021-02-08 05:01:45 +00:00
Károly Balogh
d0178f7ae0 m68k: fix a_loadfpu_ref_reg to call a_loadfpu_reg_reg instead of a_load_reg_reg. made a_loadfpu_reg_reg internalerror on invalid target sizes when loading to a different reg size
git-svn-id: trunk@48523 -
2021-02-08 04:12:21 +00:00
Károly Balogh
77fee8b4eb m68k: do not use OS_NO for FPU locations, but properly promote location sizes into the CG
git-svn-id: trunk@48522 -
2021-02-08 04:07:04 +00:00
Károly Balogh
67fcf0f03e m68k: revert r48224, the fix proposed in that patch was just hiding an underlying issue
git-svn-id: trunk@48415 -
2021-01-25 00:42:01 +00:00
Károly Balogh
10fa12bbae m68k: take rounding requirements into account in a_loadfpu_reg_reg and a_loadfpu_ref_reg
git-svn-id: trunk@48414 -
2021-01-25 00:27:59 +00:00
Károly Balogh
da1746426b m68k: do not optimize away fmove fpureg0, intreg0; fmove intreg0; fpureg0; constructs, they're used for rounding to single on FPUs with no resultprecision encoding
git-svn-id: trunk@48413 -
2021-01-25 00:12:53 +00:00
pierre
4111e13017 Avoid inlining of real constant for m68k if type is not best precision
git-svn-id: trunk@48224 -
2021-01-19 22:33:32 +00:00
Károly Balogh
6190258f5d m68k: new CPU capability - the LINK instruction supports LONG displacements (68020+)
git-svn-id: trunk@47849 -
2020-12-26 00:21:31 +00:00
Károly Balogh
16a21eea87 m68k: the LEA+MOVEM to MOVEM optimization is not feasible on a ColdFire
git-svn-id: trunk@47847 -
2020-12-25 09:07:21 +00:00
florian
0ab69ea0ad + m68k: LEA, MOVE(M) to MOVE(M) predecremented optimization and MOVE(M), LEA to MOVE(M) postincremented optimization
git-svn-id: trunk@47762 -
2020-12-11 22:14:17 +00:00
florian
a0a8a6911a * m68k: proper values for first_*_reg
git-svn-id: trunk@47761 -
2020-12-11 22:14:16 +00:00
florian
817ef6949a * m68k: MOVE, TST, Jxx/Sxx to MOVE, Jxx optimization
git-svn-id: trunk@47751 -
2020-12-10 21:51:26 +00:00
florian
bb8c3fd153 * made optimization JSR, RTS to JMP more bullet proof, added comment
git-svn-id: trunk@47750 -
2020-12-10 21:09:20 +00:00
Károly Balogh
7f96a26de0 m68k: in g_concatcopy, check the actual alignment of references being copied rather than always excluding word and dword sized direct copies on a 68000
git-svn-id: trunk@47744 -
2020-12-10 04:17:06 +00:00
florian
a849e51a3c + m68k: JSR, RTS to JMP optimization
git-svn-id: trunk@47740 -
2020-12-09 20:57:06 +00:00
florian
fbb2e63fea + #QLvember work: stack frame optimization for m68k
git-svn-id: trunk@47629 -
2020-11-29 10:16:00 +00:00
florian
5ca2356638 * take care of po_noreturn in more cases
git-svn-id: trunk@47623 -
2020-11-28 16:02:51 +00:00
Károly Balogh
7444733f5d m68k: fix DB/DW/DD handling in inline assembler, update BuildConstant() method to current standards. issue reported/initial patch by Marcel Kilgus in QLForum.co.uk
git-svn-id: trunk@47548 -
2020-11-24 05:42:38 +00:00
Károly Balogh
e5d2c1a980 m68k: fixed parsing of constants to absolute addresses
git-svn-id: trunk@47419 -
2020-11-15 03:55:42 +00:00