Commit Graph

261 Commits

Author SHA1 Message Date
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
Károly Balogh
def4df9791 m68k: fixed a bug, where during during unaligned stores, the base address was preinitalized to a temp address register from the wrong reference, causing havoc
git-svn-id: trunk@34584 -
2016-10-01 14:43:47 +00:00
Károly Balogh
ed13f4d0d1 m68k: add a function to optimize const MUL cases to sequences of shifts + ADD/SUB. mainly for '000 and other low end 68ks with slow/limited MUL capabilities. inactive for now, as it wasn't that extensively tested
git-svn-id: trunk@34560 -
2016-09-25 19:46:00 +00:00
Jonas Maebe
aa1be3276f - removed default value of _typ parameter of TAsmData.(Weak)RefAsmSymbol():
it was AT_NONE, which is invalid and should never be used
  * explicitly pass the correct value for all calls to those methods elsewhere
    in the compiler

git-svn-id: trunk@34250 -
2016-08-05 07:09:16 +00:00
Károly Balogh
2eeb078f3e m68k: removed obsolete and wrong comment. the '881 extended type is actually 12 bytes during load/store, not 10, which means longword alignment is fine. no functional changes.
git-svn-id: trunk@33910 -
2016-06-05 07:11:23 +00:00
Károly Balogh
a561ffe836 m68k: fixed initial offset adjustment for the unaligned store
git-svn-id: trunk@33860 -
2016-05-31 00:47:57 +00:00
Károly Balogh
2d6736e40e m68k: fixed unaligned stores' predecrement addressing. also removed an unnecessary sign-extension of the tmpreg for 16bit stores
git-svn-id: trunk@33853 -
2016-05-29 18:25:33 +00:00
Károly Balogh
62e0eab89b m68k: also handle large register save/restore offsets on 68000
git-svn-id: trunk@33808 -
2016-05-26 00:04:55 +00:00
Károly Balogh
0dd5beb064 m68k: more unaligned access support in the base cg, also enabled the code
git-svn-id: trunk@33807 -
2016-05-26 00:03:25 +00:00