Karoly Balogh
6bbb10e64d
m68k: do not generate LEA instructions with explicitly specified size. only long is possible anyway.
2023-01-30 09:56:41 +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
7d23c2e9d0
m68k: use CPU capabilities at places instead of hardwiring cpu_coldfire
2022-08-26 18:42:24 +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
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
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
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
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
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
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
florian
637976e83f
* patch by Marģers to unify internal error numbers, resolves #37888
...
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +00:00
florian
995d2d280a
- no need to call add_move_instruction if data is moved between different register classes
...
git-svn-id: trunk@46332 -
2020-08-08 14:48:24 +00:00
Károly Balogh
c38efe6d18
m68k: tabs to spaces and indentation fix, no functional change
...
git-svn-id: trunk@45389 -
2020-05-16 19:15:52 +00:00
Károly Balogh
fc5c35362b
m68k: preparations for upcoming full instruction tables, mostly converting code away from using sets of opcodes
...
git-svn-id: trunk@45307 -
2020-05-07 23:30:13 +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
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
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
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
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
pierre
0bcf9a51d9
Avoid range check error when compiled with -CR
...
git-svn-id: trunk@40000 -
2018-10-20 18:49:53 +00:00
Jonas Maebe
0b246f3dbd
* converted Boolean8 to an internal type, and mapped Boolean to the
...
new internal pasbool1(type) (part of mantis #34411 )
o apply the _Bool x86-64 parameter passing rules only to pasbool1
git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
Jonas Maebe
4686f61002
* keep track of the temp position separately from the offset in references,
...
so that they can still be freed after the reference has been changed
(e.g. in case of array indexing or record field accesses) (mantis #33628 )
git-svn-id: trunk@38814 -
2018-04-22 17:03:16 +00:00
nickysn
518cdf9674
* replaced the saved_XXX_registers arrays with virtual methods inside
...
tcpuparamanager, very similar to the existing get_volatile_registers_XXX. The
new methods are called get_saved_registers_XXX, where XXX is the register
type ("int", "address", "fpu" or "mm")
git-svn-id: trunk@38794 -
2018-04-19 21:22:16 +00:00
Károly Balogh
64e7c90147
m68k: some quickhacks to support PalmOS reg-relative globals and quick-n-dirty small code PIC. needs some cleanup, but the basic idea will be useful a potential for MacOS and Amiga .library support as well, among others
...
git-svn-id: trunk@37900 -
2018-01-04 08:33:43 +00:00
Károly Balogh
358f8eb85d
m68k: do not internalerror on localsize < 0. this condition is handled elsewhere in the compiler properly, so we just let it through
...
git-svn-id: trunk@36612 -
2017-06-29 00:11:19 +00:00
Károly Balogh
02ed753fab
m68k: yet another attempt to fix small struct alignments on stack
...
git-svn-id: trunk@36605 -
2017-06-27 02:36:55 +00:00
Károly Balogh
8a8753eb79
m68k: reenabled some safety checks and removed obsolete TODO comment
...
git-svn-id: trunk@36604 -
2017-06-26 19:45:11 +00:00
Károly Balogh
d5e1b391f9
m68k: when calling g_concatcopy for para copy, still only copy cgpara.intsize amount of bytes
...
git-svn-id: trunk@36603 -
2017-06-26 19:40:13 +00:00
Károly Balogh
22ae3cd186
m68k: revert the r36568 and the followup fix attempts altogether, as they broke Amiga support entirely. there will be a cleanup before another fixing attempt
...
git-svn-id: trunk@36598 -
2017-06-26 16:02:26 +00:00
Károly Balogh
b481129f4e
m68k: for cdecls with the SVR4 ABI return results both in A0 and D0
...
git-svn-id: trunk@36588 -
2017-06-23 19:21:20 +00:00
Károly Balogh
8ed84afdd4
m68k: try to fix some breakages caused by r36568
...
git-svn-id: trunk@36569 -
2017-06-22 02:11:42 +00:00
Károly Balogh
23f4304881
m68k: hopefully fix passing of smaller-than-alignment sized records/structs for stdcall/cdecl
...
git-svn-id: trunk@36568 -
2017-06-22 01:14:02 +00:00
Károly Balogh
e0cbd48785
m68k: always check the V flag after MUL/DIV overflows, because MUL/DIV never sets the C flag. note that this fix is full 68k only. on CF, MUL doesn't set any of V or C flags
...
git-svn-id: trunk@36496 -
2017-06-12 23:56:05 +00:00
Károly Balogh
6ca8b1374b
m68k: quickfix the 68000 builds of the compiler after r36344
...
git-svn-id: trunk@36346 -
2017-05-26 18:26:58 +00:00
Károly Balogh
829b2fc3b3
m68k: enable 68020 codepaths to all CPUs supporting '020 features
...
git-svn-id: trunk@36335 -
2017-05-25 20:54:18 +00:00
Károly Balogh
aa87e911d7
m68k: fixed some copypaste error in a disabled debug string. no functional changes.
...
git-svn-id: trunk@36329 -
2017-05-25 15:12:28 +00:00
Károly Balogh
7ed9b9f188
m68k: instead of the FPU, use CPU instructions to copy cgparas to stack
...
git-svn-id: trunk@36289 -
2017-05-21 21:09:47 +00:00
Károly Balogh
94b684daee
m68k: reworked flags2reg, so it generates shorter code for the most common case.
...
git-svn-id: trunk@36233 -
2017-05-16 23:15:05 +00:00
Károly Balogh
ca1ec0435d
m68k: fixed the signedness of conditional jumps while creating the jump list for case statements
...
git-svn-id: trunk@36210 -
2017-05-14 22:27:09 +00:00
Károly Balogh
6d795df166
m68k: removed silly debug writeln accidentally left in r35671
...
git-svn-id: trunk@35673 -
2017-03-28 11:57:17 +00:00
Károly Balogh
21468861d4
m68k: handle more reg_ref and ref_reg operations more flexibly on the cg level. these OPs should get utilized better with some of the upcoming inline nodes
...
git-svn-id: trunk@35671 -
2017-03-28 09:57:14 +00:00
Károly Balogh
2e9d0543df
m68k: do not generate copy loops for single byte copies on a plain '000
...
git-svn-id: trunk@35281 -
2017-01-13 15:41:21 +00:00
Károly Balogh
74c1f2aec9
m68k: cosmetics (less C-ism)
...
git-svn-id: trunk@35001 -
2016-11-27 20:31:11 +00:00
Jonas Maebe
a25ebbba3e
+ added volatility information to all memory references
...
o separate information for reading and writing, because e.g. in a
try-block, only the writes to local variables and parameters are
volatile (they have to be committed immediately in case the next
instruction causes an exception)
o for now, only references to absolute memory addresses are marked
as volatile
o the volatily information is (should be) properly maintained throughout
all code generators for all archictures with this patch
o no optimizers or other compiler infrastructure uses the volatility
information yet
o this functionality is not (yet) exposed at the language level, it
is only for internal code generator use right now
git-svn-id: trunk@34996 -
2016-11-27 18:17:37 +00:00
Károly Balogh
57e6cef18b
m68k: enabled the mul to shift+sub/add optimizations for 68000
...
git-svn-id: trunk@34762 -
2016-10-23 23:46:32 +00:00
Károly Balogh
4620d9b22c
m68k: when loading from a reference with zero extend, clear the register first, then load, instead of clearing with AND later, because this is faster on slow 68ks and also shorter
...
git-svn-id: trunk@34761 -
2016-10-23 23:16:03 +00:00