Commit Graph

631 Commits

Author SHA1 Message Date
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
c5222d7199 m68k: map sec_rodata as read-write in the vasm writer, to silence some vlink warnings, when it writes the relocations in a rodata section
git-svn-id: trunk@36501 -
2017-06-14 18:07:36 +00:00
Károly Balogh
3f3c4808ee m68k: add support register calling convention properly in the interface wrapper generation
git-svn-id: trunk@36499 -
2017-06-14 02:26:40 +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
90b1c8e5ed m68k: the previous attempt in r36480 broke more tests than it fixed, so lets revert to previous version and disable MOVE+OP+MOVE optimizations instead
git-svn-id: trunk@36484 -
2017-06-11 11:22:49 +00:00
Károly Balogh
40fb45aef6 m68k: attempt to make MOVE+OP+MOVE optmization more robust. this fixes random exceptions in tfmtbcd test among others
git-svn-id: trunk@36480 -
2017-06-10 21:54:48 +00:00
Károly Balogh
fe0bc52dc6 m68k: fixed some cases where comparing smallsets was broken, because the compare size was hardwired to 32bit
git-svn-id: trunk@36470 -
2017-06-09 17:27:06 +00:00
Károly Balogh
f7488f2bd8 m68k: don't try to inline NaN and InF values as consts into FPU operands
git-svn-id: trunk@36351 -
2017-05-27 20:51:05 +00:00
Károly Balogh
b3157aa5ea m68k: generate MUL helpers for CPUs without 32bit MUL already in pass 1
git-svn-id: trunk@36348 -
2017-05-26 18:46:19 +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
87e8010f05 m68k: support 32x32 to 64bit MUL generation when targeting CPUs which support this instruction
git-svn-id: trunk@36339 -
2017-05-25 22:35:12 +00:00
Károly Balogh
63b3304374 m68k: instead of calling a helper, generate inlined code for 64 bit multiplications, when applicable
git-svn-id: trunk@36336 -
2017-05-25 20:59:12 +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
e9ff684ff0 m68k: handle operand type correctly for 3 operand mul/div
git-svn-id: trunk@36334 -
2017-05-25 20:52:57 +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
1f7b6fbd9a m68k: implement frac inline nodes
git-svn-id: trunk@36290 -
2017-05-21 21:13:02 +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
2d8f56597e m68k: reenabled the 68k-specific n68kset node
git-svn-id: trunk@36211 -
2017-05-15 00:45:06 +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
fbbe2981ca m68k: disable the cpu specific set node, until we fix some of the recently found problems with it
git-svn-id: trunk@36208 -
2017-05-14 20:52:18 +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
eeb660017e m68k: improve floating point compares against memory references by swapping sides when left is a reference and right is a register
git-svn-id: trunk@35672 -
2017-03-28 11:50:39 +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
a405b5a150 m68k: improve getreferencestring function a bit
git-svn-id: trunk@35634 -
2017-03-20 23:48:28 +00:00
Károly Balogh
a4b096e9da m68k: added the embedded target
git-svn-id: trunk@35589 -
2017-03-15 13:37:56 +00:00
Károly Balogh
07cfb2f43a m68k: removed unused 3 ops taicpu constructors
git-svn-id: trunk@35494 -
2017-02-28 22:10:59 +00:00
Károly Balogh
a34b6c7c53 m68k: atari also uses syscalls, so update the comment for that too
git-svn-id: trunk@35375 -
2017-01-31 14:43:25 +00:00
svenbarth
4d41decd5d * since m68k has a working implementation for the register calling convention and it's in fact used as default calling convention it should also be possible to explicitely declare routines as that calling convention
git-svn-id: trunk@35351 -
2017-01-28 14:54:31 +00:00
svenbarth
d35e9a69fa * update comment regarding pocall_syscall in supported_calling_conventions
git-svn-id: trunk@35350 -
2017-01-28 14:53:17 +00:00
Károly Balogh
94ec8ad854 m68k: added BSD targets, this means NetBSD, still under development
git-svn-id: trunk@35315 -
2017-01-16 21:30:39 +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
78a7710192 m68k: with the register calling convention, pass records by reference
git-svn-id: trunk@35279 -
2017-01-12 18:06:13 +00:00
Károly Balogh
3e4c905813 m68k: make vasm to use ELF objects on amiga, enabled smartlink sections
git-svn-id: trunk@35240 -
2017-01-05 22:29:08 +00:00
Károly Balogh
35ddac66fc m68k: fix frame pointer register on atari, and a few other non-amiga systems
git-svn-id: trunk@35204 -
2016-12-27 17:09:06 +00:00
Jonas Maebe
880d438704 * renamed t<cpuname>procinfo to tcpuprocinfo for all targets, so we can
inherit from it for LLVM without a thousand ifdefs

git-svn-id: trunk@35141 -
2016-12-16 22:41:21 +00:00
Károly Balogh
026f0e99f3 m68k: made the vasm writer use the right section attributes, but disabled named sections until some vlink issues are sorted out
git-svn-id: trunk@35116 -
2016-12-12 22:46:47 +00:00
Károly Balogh
2dc1d681c2 m68k: inherit the aout assembler writer instead of the normal one for amiga and atari. this allows to remove some of the previously added hacks in the generic writer
git-svn-id: trunk@35114 -
2016-12-12 22:41:53 +00:00
Károly Balogh
4e51dc2298 m68k: enable named sections for vasm generated objects. have a separate as_m68k_as_aout for a.out objects which doesn't have named sections. amiga and atari gas defaults to a.out, so have it default on these systems. finally enable section smartlinking for amiga and atari, which will be used with vasm assembler
git-svn-id: trunk@35112 -
2016-12-11 23:27:24 +00:00
Károly Balogh
66e651bed0 m68k: build fix
git-svn-id: trunk@35111 -
2016-12-11 16:49:03 +00:00
Károly Balogh
df38fd18e0 m68k/powerpc: improved version of int_to_bool casting. now both also passes the improved version of tb0625
git-svn-id: trunk@35108 -
2016-12-11 15:43:58 +00:00
Károly Balogh
288a39d86e m68k: indentation fixes. no functional changes.
git-svn-id: trunk@35106 -
2016-12-11 03:58:41 +00:00
Károly Balogh
15f67e6f5b m68k: in int to bool conversion, only try to zero/sign extend the value, if the destination is actually larger than the source
git-svn-id: trunk@35105 -
2016-12-11 03:57:55 +00:00
Károly Balogh
0cb555c07c syscalls: move the reference implementation of parseparaloc to paramgr. removes two identical copies from CPU specific code and enables basereg convention for AROS/x86_64. also, other minor fixes and cleanups in related code.
git-svn-id: trunk@35047 -
2016-12-03 19:00:41 +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
4ee06e7bec m68k: implemented in_int_real support
git-svn-id: trunk@34993 -
2016-11-27 17:50:10 +00:00
Károly Balogh
c4e954c9a5 m68k: added fint and fintrz instructions
git-svn-id: trunk@34991 -
2016-11-27 17:42:24 +00:00
Károly Balogh
975dd13dcb m68k: fixed a copy paste error, which broke cos node on a coldfire fpu, effectively turning it into a sin node
git-svn-id: trunk@34987 -
2016-11-27 15:59:16 +00:00
Károly Balogh
a595877da3 m68k: in fmove + op + fmove optimizations, allow the ops precision to be different to the fmoves
git-svn-id: trunk@34985 -
2016-11-27 15:17:58 +00:00