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
Károly Balogh
98d4c426cb
m68k: some groundwork for an improved optimizer, now tries to optimize away MOVE/FMOVE based unnecessary register shuffling around ops when possible (with room for further improvements)
...
git-svn-id: trunk@34979 -
2016-11-27 11:23:11 +00:00
Jonas Maebe
74a49b5f91
* restructured the the TExternalAssembler constructors so that the
...
hack for the Jasmin descendent is no longer needed
git-svn-id: trunk@34852 -
2016-11-09 19:51:20 +00:00
Károly Balogh
4ee4099fca
m68k: introduce a register calling convention, inspired by VBCC. volatile registers are used to pass arguments
...
git-svn-id: trunk@34821 -
2016-11-06 18:00:29 +00:00
pierre
89c1b68b14
* Delete regvars unit.
...
This unit was empty unless OLDREGVARS macro was set,
but this does not compile and no change has been made since 2011.
* Remove regvars from all _USES clauses.
git-svn-id: trunk@34808 -
2016-11-06 14:01:39 +00:00
Károly Balogh
37f43d3604
m68k: cleanup of the BuildRefExpression method in the assembler reader
...
git-svn-id: trunk@34784 -
2016-11-05 19:58:06 +00:00
Károly Balogh
64650261d1
m68k: refactor of the reglist and the regpair support in the assembler reader. also added support for float register lists for FMOVEM
...
git-svn-id: trunk@34783 -
2016-11-05 18:53:20 +00:00
Károly Balogh
5237a4d5e2
m68k: support register pair operands in assembler reader and writer, as used by some instructions (mainly DIVS/DIVU and friends) so we don't have to hack them as three operand instructions
...
git-svn-id: trunk@34782 -
2016-11-05 17:07:18 +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
41776e9608
m68k: on a '000, optimize CLR.L Dx to MOVEQ #0,Dx which is slightly faster
...
git-svn-id: trunk@34760 -
2016-10-23 23:10:39 +00:00
Károly Balogh
660432685a
m68k: review and some cleanup of the shlshrnode, also add a special case for shifting 64bit values by 1
...
git-svn-id: trunk@34757 -
2016-10-23 16:46:34 +00:00
Károly Balogh
51cb5aefbe
m68k: use target_info.stackalign to align the stack instead of expecting a hardwired longword alignment. this is required for atari, and beneficial on all '000 targets
...
git-svn-id: trunk@34666 -
2016-10-08 14:01:32 +00:00
Károly Balogh
003487baab
m68k: code generation for atari syscalls
...
git-svn-id: trunk@34611 -
2016-10-03 23:39:36 +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
Jonas Maebe
a0efde8167
* automatically generate necessary indirect symbols when a new assembler
...
symbol is defined
o removed all places where AB_INDIRECT symbols were explicitly generated
o only generate AB_INDIRECT symbols for AT_DATA on systems_indirect_var_imports
o for some symbols an indirect symbol is always required (because they are
dereferenced by code in RTL units) -> use new AT_DATA_FORCEINDIRECT type
git-svn-id: trunk@34165 -
2016-07-20 20:53:03 +00:00
Jonas Maebe
1cb8c0d00c
* specify the def of assembler level symbols defined via
...
tasmdata.DefineAsmSymbol() and all routines that call it
o will be used to automatically generate AB_INDIRECT sybols when
necessary
git-svn-id: trunk@34164 -
2016-07-20 20:52:59 +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
77318be022
m68k: fix build errors with some assemblers on modulo calculation on 020+
...
git-svn-id: trunk@33867 -
2016-06-01 10:50:22 +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
b4fd85f19c
m68k: unaligned handling for math and typeconv nodes
...
git-svn-id: trunk@33854 -
2016-05-29 18:48:24 +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
a8ad51e96f
m68k: unaligned access support in add nodes
...
git-svn-id: trunk@33852 -
2016-05-29 18:12:36 +00:00
Károly Balogh
a756609a27
m68k: added a simple VASM writer frontend for the GNU AS writer (as VASM has a compatiblity mode)
...
git-svn-id: trunk@33847 -
2016-05-29 15:52:43 +00:00
Károly Balogh
c509036c11
m68k: added REMS/REMU to the special formatting requirements list in the assembler writer
...
git-svn-id: trunk@33840 -
2016-05-28 15:30:48 +00:00
Károly Balogh
a2a630e9c5
m68k: fixed and enabled hardware mod/div support for coldfire, also it no longer depends on cpu family but cpu capability
...
git-svn-id: trunk@33821 -
2016-05-26 16:54:39 +00:00
Károly Balogh
931c14f0cf
m68k: in second_int_to_bool, don't call TST after OR, since OR sets the flags as required already
...
git-svn-id: trunk@33819 -
2016-05-26 14:48:56 +00:00
Károly Balogh
766eeffc69
m68k: build fix. (changes before commit is a bad idea...)
...
git-svn-id: trunk@33817 -
2016-05-26 14:47:16 +00:00
Károly Balogh
2bfa1b995a
m68k: added division/remainder cpu capabilities
...
git-svn-id: trunk@33816 -
2016-05-26 14:41:00 +00:00
Károly Balogh
6706445cb4
m68k: enable hardware divisions for all '020+, not only 020 itself
...
git-svn-id: trunk@33810 -
2016-05-26 10:38:08 +00:00
Károly Balogh
aa63aa95bb
m68k: a bunch of '000 related fixes and cleanups. generated source now compiles for '000 again, which was broken due to recent improvements conflicting with limitations of the original '000
...
git-svn-id: trunk@33809 -
2016-05-26 10:33:29 +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
Károly Balogh
b6d845e732
m68k: needs_unaligned helper. returns true when the given reference with the given size needs to be loaded with unaligned support on the given cpu
...
git-svn-id: trunk@33806 -
2016-05-25 23:56:24 +00:00
Károly Balogh
7fbae10515
m68k: added more cpu capabilities (unaligned access, long addressing, various MULx), and the 68060 cpu target
...
git-svn-id: trunk@33804 -
2016-05-25 22:14:58 +00:00
Károly Balogh
5acd04d284
m68k: some experimental code for the unaligned access support on plain 68000. work in progress, inactive code for now
...
git-svn-id: trunk@33744 -
2016-05-22 00:32:41 +00:00
Károly Balogh
a6ee4a2ded
m68k: cleaned up second_addordinal and included OP_SUB in the common codepath
...
git-svn-id: trunk@33743 -
2016-05-21 18:43:26 +00:00
Károly Balogh
47621f81cd
m68k: implemented second_addordinal; for the most trivial cases. this allows the right node to be a reference. falls back to the generic implementation for nontrivial cases.
...
git-svn-id: trunk@33741 -
2016-05-21 16:46:12 +00:00
Károly Balogh
786aecabeb
m68k: improved a_op_reg_ref, to support more operations. implemented a_op_ref_reg
...
git-svn-id: trunk@33739 -
2016-05-21 16:41:13 +00:00
Károly Balogh
25c34aedc2
m68k: implemented tcpucasenode.genlinearlist. 68k doesn't need cmp after sub, as sub sets the flags as expected. results in simpler, faster and more compact code
...
git-svn-id: trunk@33709 -
2016-05-19 21:33:45 +00:00
Károly Balogh
424f329173
m68k: use inlined realconsts also during normal float calculations on '881/040/060. also optimize them where possible
...
git-svn-id: trunk@33671 -
2016-05-10 18:19:41 +00:00
Károly Balogh
2dbfca4e8e
m68k: optimize a few cases of comparisons against inlined realconsts
...
git-svn-id: trunk@33669 -
2016-05-10 15:39:08 +00:00
Károly Balogh
7710300c22
m68k: utilize FTST for comparing against float zero. also utilize FCMP realconst,fpreg on '881 for other realconst values
...
git-svn-id: trunk@33668 -
2016-05-10 15:38:13 +00:00
Károly Balogh
e7838dad39
m68k: initial asm-level infrastructure to let the codegenerator output float consts as operands, which is supported on 88x/040/060
...
git-svn-id: trunk@33667 -
2016-05-10 13:47:46 +00:00
Károly Balogh
3e2319ff3a
m68k: do not allocate/free the regset dynamically having it as a normal field is perfectly fine
...
git-svn-id: trunk@33665 -
2016-05-10 13:03:17 +00:00
Károly Balogh
3b4822d320
m68k: utilize MVS and MVZ instructions to load values from references with zero/sign extend when they're available
...
git-svn-id: trunk@33656 -
2016-05-05 23:55:50 +00:00
Károly Balogh
bd17976cf1
m68k: added Coldfire CPU capability MVS/MVZ instructions. also fixed CFv4e capabilities
...
git-svn-id: trunk@33655 -
2016-05-05 23:54:37 +00:00
Károly Balogh
2e9ed396b4
m68k: convert non-int paraloc sizes to int in a_load_ref_cgpara, fixes build breaks with softfpu since r33651
...
git-svn-id: trunk@33653 -
2016-05-05 02:33:54 +00:00
Károly Balogh
1e6e5a1874
m68k: implemented a_load64_reg_ref and a_load64_ref_reg. avoids duplicated reference simplifications in the generated code during 64bit load/store
...
git-svn-id: trunk@33652 -
2016-05-05 00:58:21 +00:00
Károly Balogh
2b250a1b0a
m68k: use a_load_ref_ref in a_load_ref_cgpara instead of a custom loading code which does the same. causes no changes in generated code
...
git-svn-id: trunk@33651 -
2016-05-05 00:55:52 +00:00
Károly Balogh
88e14dc456
m68k: only extend the dest reg to tosize during reg-reg moves. this removes a large amount of unnecessary sign and zero extensions from the generated code. this was attempted before, but thanks to other fixes it no longer causes testsuite regressions
...
git-svn-id: trunk@33648 -
2016-05-04 09:52:27 +00:00
Károly Balogh
524659b341
m68k: if we have a symbol in the location reference, that will be base, so try to insert an index register instead, reduces the amount of data->address register shuffling in the generated code
...
git-svn-id: trunk@33647 -
2016-05-03 23:55:27 +00:00
Károly Balogh
50a40062e2
m68k: fixed the build after r33614
...
git-svn-id: trunk@33617 -
2016-05-02 15:01:47 +00:00
Károly Balogh
92b2cf917d
m68k: when saving/restoring FPU registers, use the right FPU register size on ColdFire to calculate the stored size
...
git-svn-id: trunk@33614 -
2016-05-02 14:18:30 +00:00
Károly Balogh
aa8b45904e
m68k: use the existing g_call infrastructur to handle the register allocation in the helpers
...
git-svn-id: trunk@33589 -
2016-05-01 10:42:52 +00:00
Károly Balogh
0b7464e4cd
m68k: fix large const loading to address registers
...
git-svn-id: trunk@33588 -
2016-05-01 10:41:40 +00:00
Károly Balogh
f48747adf5
m68k: reworked cg.g_concatcopy. generates shorter and faster code in most cases now.
...
git-svn-id: trunk@33575 -
2016-04-30 00:15:34 +00:00
Károly Balogh
2f23b5f0fd
m68k: output some GAS specific pseudo instructions in the GNU as writer, so the assembler can do branch size optimization for us
...
git-svn-id: trunk@33559 -
2016-04-26 01:34:26 +00:00
Károly Balogh
4287f81b92
m68k: support and use float TResFlags in the rest of the CG. ColdFire FPU now works, and FSxx is no longer generated which is software supported on '060, and doesn't exist on CF. if we still want to support it later, we can add it to cg.g_flags2reg
...
git-svn-id: trunk@33558 -
2016-04-25 23:40:44 +00:00
Károly Balogh
23106882ac
m68k: extended TResFlags with float resflags
...
git-svn-id: trunk@33557 -
2016-04-25 23:30:56 +00:00
Károly Balogh
9d2dad2463
m68k: added cpu type cfv4e, which is the only ColdFire with FPU, and GNU AS needs this to actually allow CF FPU code
...
git-svn-id: trunk@33556 -
2016-04-25 22:04:05 +00:00
Károly Balogh
bd564b8933
m68k: some code to support the ColdFire v4e FPU. not functional yet.
...
git-svn-id: trunk@33533 -
2016-04-18 03:25:32 +00:00
Károly Balogh
2e64db935a
m68k: BSET and BCLR's dest operand is actually readwrite, not write only. fixes sets with regvars, when the regvar is spilled
...
git-svn-id: trunk@33476 -
2016-04-10 18:56:51 +00:00
Károly Balogh
4e964c2ed7
m68k: rewrote fixref and a_load_ref_ref, fixing a bunch of problems on ColdFire, unifying and simplifying the code a lot, and hopefully not killing anything in the process
...
git-svn-id: trunk@33446 -
2016-04-08 03:27:19 +00:00
Károly Balogh
96fe4313dd
m68k: fixed spilling code interfering with some ADDQ/SUBQ/MOV3Q instructions, fixes paszlib failing since r32830
...
git-svn-id: trunk@33445 -
2016-04-08 03:21:09 +00:00
sergei
36043d13ae
- Removed remains of tai_labeled_instruction, already commented out probably in 1.0 times.
...
git-svn-id: trunk@33074 -
2016-02-09 02:25:27 +00:00
Károly Balogh
b799ca40f8
m68k: various cleanups and improvements in the GAS assembler writer: pass operands to the helpers by reference, removed a few extra shortstring copies, cleanups
...
git-svn-id: trunk@32849 -
2016-01-05 04:12:00 +00:00
Károly Balogh
288fa53694
m68k: is_calljmp cleanup
...
git-svn-id: trunk@32848 -
2016-01-05 04:07:00 +00:00
Károly Balogh
2b3bd71735
m68k: include CMPI in the CMP to TST optimization
...
git-svn-id: trunk@32842 -
2016-01-04 01:14:34 +00:00
Károly Balogh
1e0763e251
m68k: use a_load_const_ref in a_load_const_cgpara to utilize the recently added optimized small const loading here too. this change alone shaves off ~80KB from the compiled FP IDE size...
...
git-svn-id: trunk@32841 -
2016-01-03 23:48:06 +00:00
Károly Balogh
185ee93312
m68k: if we're loading small (8 bit signed) values into long references, move them through a register (usually with MOVEQ). this is two bytes shorter and also faster on most 68k CPUs
...
git-svn-id: trunk@32837 -
2016-01-03 18:32:27 +00:00
sergei
f69f6336e9
* Replaced hacks with resetting 'c' to zero and decreasing inputpointer by boolean parameter to skipcomment and skipoldtpcomment. This parameter specifies whether first character of comment should be read.
...
- in_asm_string also rendered useless by r32828, removed.
git-svn-id: trunk@32836 -
2016-01-03 17:07:15 +00:00
Károly Balogh
ff7a0c5235
m68k: while updating reference, don't reallocate and copy the index to another register if we can apply scaling for it and we don't need to multiply, so the maybe_const_reg doesn't change. this improves generated code when a const reg (eg: a loop counter) is used as array index
...
git-svn-id: trunk@32830 -
2016-01-02 16:05:41 +00:00
Károly Balogh
92e7c0b03f
m68k: assembler reader changes
...
* don't reimplement BuildStringConst, use the inherited one
* findopcode's string argument is now const, simplified the function and removed some dead code
* removed an intentional null ptr write in an error path, which was debug code and left in accidentally
git-svn-id: trunk@32829 -
2016-01-02 15:51:42 +00:00
sergei
bbfbab7e0c
* Moved handling of comments and line breaks in assembler blocks from scanner to tokenizer level. Handling them at character level was causing compiler to accept comments in the middle of any assembler token, which should never happen. It was also causing Mantis #27459 : a newline immediately after closing 'end' token was first handled in asmgetchar and then by normal parser, causing all subsequent line numbering to be off by one.
...
git-svn-id: trunk@32828 -
2016-01-02 06:17:14 +00:00
sergei
b1ee3dd5e5
* m68k assembler reader: call tscannerfile.illegal_char instead of reimplementing it.
...
git-svn-id: trunk@32819 -
2016-01-01 10:49:38 +00:00
Károly Balogh
aa424fc81f
m68k: use R_SUBNONE instead of R_SUBWHOLE for FPU regs, indentation fixes of some old code and various cleanups
...
git-svn-id: trunk@32659 -
2015-12-13 19:24:44 +00:00
Károly Balogh
c82328e3fd
m68k: implemented tcg68k.check_register_size for future use. use R_SUBNONE for FPU registers, because R_SUBWHOLE will change. use isregoverlap in a_load_reg_reg
...
git-svn-id: trunk@32658 -
2015-12-13 19:18:39 +00:00
Károly Balogh
001dfecdf5
m68k: use isregoverlap in is_same_reg_move, to determine if we're doing a no-op move
...
git-svn-id: trunk@32657 -
2015-12-13 18:14:21 +00:00
Károly Balogh
c47c6c0270
m68k: use std_regnum_search instead of prefixing the regname with % and calling gas_regnum_search
...
git-svn-id: trunk@32656 -
2015-12-13 18:04:30 +00:00
Károly Balogh
9c12615f09
m68k: new isregoverlap function, which returns true if the two registers overlap (same type and subreg). use the new r68kbss.inc for regnumber_count_bsstart. other minor tweaks.
...
git-svn-id: trunk@32655 -
2015-12-13 17:48:47 +00:00
Károly Balogh
2934424c43
m68k: updated/added some reg includes as generated by the new tool
...
git-svn-id: trunk@32654 -
2015-12-13 17:32:00 +00:00
Károly Balogh
9133964676
m68k: new 68k register data file format, which eases future subregister support
...
git-svn-id: trunk@32653 -
2015-12-13 17:29:47 +00:00
Károly Balogh
3c0dca44d3
m68k: fixed a copypaste fail in tcg68k.g_restore_registers, which affected FPU register restoring
...
git-svn-id: trunk@32651 -
2015-12-13 13:15:51 +00:00
Jonas Maebe
fa3b0ca312
* support marking defs created via the getreusable*() class methods as
...
"don't free even if not registered"; use for defs that may not be written
to a ppu file, but that must nevertheless survive the compilation of the
current module
* mark all defs created for para locations as "don't free even if not
registered", because we don't discard and recalculate all para locations
after a module has been compiled (since that's not needed)
o solves issues if the paralocations for a routine in the interface of
unit A are calculated while the implementation of unit B gets
compiled, and a new reusable type is allocated at that point which
is not used anywhere else (after r32160)
git-svn-id: trunk@32235 -
2015-11-04 20:46:18 +00:00
Jonas Maebe
991e1f49bd
* store a pointer to the used tasminfo record in every assembler writer, so
...
that we can use assembler writers with different conventions from the
currently set target_asm (e.g. an x86 assembler writer for inline assembly
in LLVM IR)
git-svn-id: trunk@31628 -
2015-09-12 23:32:13 +00:00
Jonas Maebe
b3d0197f98
* factored out the output file handling (mostly writing data) from the
...
external assembler writer, so we can reuse the archtecture-specific
writers to write inline assembly in LLVM IR files
git-svn-id: trunk@31625 -
2015-09-12 23:32:01 +00:00
Jeppe Johansen
3cb9be73bc
Moved tcontrollerdatatype out into cpuinfo.
...
Added cputype and fputype info to tcontrollerdatatype arrays.
git-svn-id: trunk@31574 -
2015-09-07 20:36:54 +00:00
Jonas Maebe
0fc1fd6ac1
* replaced current_procinfo.currtrue/falselabel with storing the true/false
...
labels of LOC_JUMP in the node's location. This generates some extra jumps
for short circuit boolean and/or-expressions if optimizations are off, but
with optimisations enabled the generated code is the same (except for JVM
because the jump threading optimisation isn't enabled there yet).
git-svn-id: trunk@31431 -
2015-08-27 18:28:57 +00:00
Jonas Maebe
f402b0d7df
* changed getpointerdef() into a tpointerdef.getreusable() class method
...
o allows removing the ugly x86 hacks
git-svn-id: trunk@31144 -
2015-06-22 08:17:49 +00:00
florian
b222d0b663
* correctly handle LOC_SUBSETREG,LOC_CSUBSETREG,LOC_SUBSETREF,LOC_CSUBSETREF in second_int_to_bool, resolves issue #28007
...
git-svn-id: trunk@30765 -
2015-05-02 13:52:50 +00:00
florian
7dd1d6aa77
o fixes handling of iso i/o parameters/program parameters:
...
* explicit reset is needed
* variable must be declared again
git-svn-id: trunk@30757 -
2015-05-01 20:58:31 +00:00
Jonas Maebe
61e4a1b811
+ added tasmlist parameter to getintparaloc() (needed for llvm)
...
git-svn-id: trunk@30429 -
2015-04-04 14:29:16 +00:00
Jonas Maebe
201121d7c9
* synchronised with trunk till r30345
...
git-svn-id: branches/hlcgllvm@30349 -
2015-03-28 12:28:15 +00:00
Károly Balogh
87deec105d
m68k: implemented 68k specific a_bit_set_const_ref and a_bit_set_reg_ref, using BSET/BCLR
...
git-svn-id: trunk@30278 -
2015-03-22 17:44:59 +00:00
Károly Balogh
c49c8210a3
m68k: some initial HLCG, use BSET/BCLR instructions for simple bit manipulation
...
git-svn-id: trunk@30275 -
2015-03-22 14:01:14 +00:00
Károly Balogh
ad301f8fa1
m68k: implemented t68kvecnode.update_reference_reg_packed. same as the generic one, but allocates int registers instead of address registers, because on 68k IMUL,SHR/SHL and AND can't work on address registers, which results in a lot of register shuffling
...
git-svn-id: trunk@30267 -
2015-03-21 20:09:35 +00:00
Károly Balogh
258b42de26
m68k: added support for FSIN/FCOS. these are software supported on the 68040, so we should have a separate 68040/060 FPU option too, to avoid these in the future.
...
git-svn-id: trunk@30257 -
2015-03-17 22:52:53 +00:00
Károly Balogh
b617345e43
m68k: disabled premature MOVEA #0,Ax to SUBA Ax,Ax in the CG, because it breaks with spilling temp replacement and moved it to the optimizer, where it belongs. this fixes some code with potentially heavy address register pressure, like the IDE.
...
git-svn-id: trunk@30245 -
2015-03-16 02:04:58 +00:00
Jonas Maebe
bd203a5b57
* synchronised with trunk till r30240
...
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
Károly Balogh
2555f12394
m68k: improved handling of moves and sign/zero extensions targeting address regs
...
git-svn-id: trunk@30232 -
2015-03-15 01:44:43 +00:00
Károly Balogh
918c4add06
m68k: in do_spill_replace, exclude the case where the source register would be an address and the destination is a reference
...
git-svn-id: trunk@30191 -
2015-03-14 17:19:14 +00:00
Károly Balogh
935820293c
m68k: in tm68ktypeconvnode.int_to_real, fix the reference before using it, and if the source is a register, make sure it's a data register
...
git-svn-id: trunk@30190 -
2015-03-14 17:14:10 +00:00
Károly Balogh
1121c2e6ce
m68k: before doing a reg->ref operation, make sure the source is a datareg
...
git-svn-id: trunk@30189 -
2015-03-14 16:36:02 +00:00
Jonas Maebe
67b8aceaee
* synchronized with privatetrunk till r30095
...
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Károly Balogh
106056f462
m68k: more FMOVEM.X store/load size fixes
...
git-svn-id: trunk@30062 -
2015-03-02 02:55:23 +00:00
Károly Balogh
acaf382ea0
m68k: FMOVEM.X stores/loads each reg as 12 bytes (96 bits) not 10 bytes (80 bits), see 68k PRM, page 5-86
...
git-svn-id: trunk@30061 -
2015-03-02 02:48:35 +00:00
Károly Balogh
5f66d63335
m68k: disabled comment generation
...
git-svn-id: trunk@30045 -
2015-03-01 15:49:57 +00:00
Károly Balogh
997ec578e0
m68k: added a simple unaryminusnode which can utilize FNEG instruction for floats on 68881
...
git-svn-id: trunk@30044 -
2015-03-01 15:00:07 +00:00
Jonas Maebe
d6de2c03cb
* generic part of r26050 from the hlcgllvm branch: made tcgvecnode hlcg-safe
...
o in particular, add tdef size information to the update_reference*()
methods, and factored out offset adjustments into its own method
o also make sure the passed size to update_reference*() corresponds to the
actual size of the index, as it's no longer guaranteed to be ptruint
since the previous commit
git-svn-id: trunk@29967 -
2015-02-23 22:56:00 +00:00
Károly Balogh
d85b49755c
m68k: some ideas for a future second_abs_long implementation. no functional changes.
...
git-svn-id: trunk@29806 -
2015-02-23 03:37:51 +00:00
Károly Balogh
c72f58bcc5
m68k: implemented sqrt_real and abs_real inlines
...
git-svn-id: trunk@29805 -
2015-02-23 02:41:33 +00:00
Károly Balogh
db50666b3b
n68kinl: added inline nodes for 68k. implemented first_sqr_real and second_sqr_real for 68881 FPU
...
git-svn-id: trunk@29799 -
2015-02-22 23:11:16 +00:00
Károly Balogh
3650991d90
m68k: support LOC_REFERENCE/LOC_CREFERENCE for floating point instructions where possible
...
git-svn-id: trunk@29714 -
2015-02-15 20:15:21 +00:00
Károly Balogh
fdb09365ba
m68k: instead of trying to mess with LOC_FLAGS, use LOC_REGISTER to return a boolean result of the compare. idea by Florian. fixes several issues with optimizer enabled and also results in better code in some cases.
...
git-svn-id: trunk@29709 -
2015-02-15 17:15:15 +00:00
Károly Balogh
9693b37c1a
m68k: actually,overwrite the resflags with F_E, because only that would be valid after the FSxx/TST combination
...
git-svn-id: trunk@29705 -
2015-02-15 14:04:11 +00:00
Károly Balogh
c062e55aa2
m68k: after a compare on the FPU, move the condition flags back to the CPU. this should make floating point compare actually working
...
git-svn-id: trunk@29704 -
2015-02-15 13:41:40 +00:00
Károly Balogh
a526b0e5d6
m68k: implemented some missing bits of FPU cgpara handling, functions with float arguments seem to work much better now
...
git-svn-id: trunk@29650 -
2015-02-08 10:26:47 +00:00
Károly Balogh
06dfa4d30c
m68k: also alloc FPU registers during RTL helper calls
...
git-svn-id: trunk@29646 -
2015-02-07 23:31:46 +00:00
Károly Balogh
a99c9c29b6
m68k: basic 68881 FPU register save/restore support. probably still needs some work here and there.
...
git-svn-id: trunk@29644 -
2015-02-07 22:13:07 +00:00
Károly Balogh
05d38053f7
m68k: optimize a few more trivial cases
...
git-svn-id: trunk@29606 -
2015-02-02 08:52:19 +00:00
Károly Balogh
9d6f763d4f
m68k: small helpers to determine a given int value fits into a certain size or instruction argument
...
git-svn-id: trunk@29605 -
2015-02-02 08:25:01 +00:00
Károly Balogh
3c2031c9c6
m68k: added RegModifiedByInstruction implementation, enabled RefsHaveScale define
...
git-svn-id: trunk@29597 -
2015-02-01 16:33:26 +00:00
Károly Balogh
460c4acaee
m68k: implement taicpu.spilling_get_operation_type_ref, supports predecrement/postincrement addressing
...
git-svn-id: trunk@29593 -
2015-02-01 15:28:54 +00:00
Károly Balogh
6070ac3def
m68k: some more basic FPU stuff
...
git-svn-id: trunk@29407 -
2015-01-05 05:26:44 +00:00
Károly Balogh
7a91d5f495
m68k: oops, unbroke the build with softfpu
...
git-svn-id: trunk@29372 -
2015-01-02 16:00:53 +00:00
Károly Balogh
d000b1bc7c
m68k: basic 68881 fpu support. probably still broken at umpzillion places, and mostly untested, but at least it builds the RTL and all packages successfully with -Cp68020 -Cf68881 instead of dying with random internalerrors() and now even emits actual FPU opcodes.
...
git-svn-id: trunk@29370 -
2015-01-02 05:29:45 +00:00
florian
5c67fcc43f
+ change always floating point divisions into multiplications if they are a power of two,
...
this is an exact operation so it is always allowed
* change only divisions by normal numbers into multiplications
git-svn-id: trunk@29085 -
2014-11-16 20:47:38 +00:00
Tomas Hajny
3ee3542744
* boolean constant instead of IFDEFs for detection of microcontroller support
...
git-svn-id: trunk@29052 -
2014-11-10 12:34:59 +00:00
pierre
aa6b62cf4c
Add new procedure option: po_syscall_has_libsym,
...
include this option only of libsym field
is non NIL.
Use this option to only write redef of libsym if needed.
Adapt ppudump source to this new procedure option.
git-svn-id: trunk@28732 -
2014-10-03 19:26:16 +00:00
Károly Balogh
8acc260a09
m68k: added the byterev and ff1 CF ISAA+/ISAC instructions, also added byterev as a CPU capability
...
git-svn-id: trunk@28679 -
2014-09-16 01:39:02 +00:00
Károly Balogh
3b205742b6
m68k: also try to optimize a special case of OP_SAR using the SWAP instruction
...
git-svn-id: trunk@28657 -
2014-09-14 12:47:07 +00:00
Károly Balogh
d561e8ab57
m68k: generate smarter shifting/rotation code on 68k, for example by utilizing the SWAP instruction
...
git-svn-id: trunk@28617 -
2014-09-07 23:46:46 +00:00
Károly Balogh
f91ae2700c
m68k: added CPUM68K_HAS_ROLROR capability flag
...
git-svn-id: trunk@28616 -
2014-09-07 23:45:51 +00:00
Károly Balogh
9991ee4165
m68k: support loading of refs to data registers, also when explicit paraloc is set and it's a register, use that directly, this fixes several syscall-related corner cases on Amiga
...
git-svn-id: trunk@28582 -
2014-09-02 17:38:34 +00:00
sergei
a5958d6e5f
* m68k: do not emit moves between same register, they end up in wrong code in some cases when register needs to be spilled (and entirely useless otherwise).
...
git-svn-id: trunk@28545 -
2014-08-30 22:00:54 +00:00
Károly Balogh
392da9e43f
* fix warnings when compiling the compiler with DFA optimizer enabled on m68k
...
git-svn-id: trunk@28499 -
2014-08-20 13:49:47 +00:00
Jonas Maebe
b18ba8e85b
* syncrhonised with trunk up till r28471
...
git-svn-id: branches/hlcgllvm@28495 -
2014-08-19 20:23:11 +00:00
Jonas Maebe
b745dcc64c
* moved g_external_wrapper() to the hlcg, and also g_intf_wrapper() because
...
for some platforms it depends on that routine
git-svn-id: branches/hlcgllvm@28492 -
2014-08-19 20:22:54 +00:00
Károly Balogh
ccc9bc0941
m68k: plain 68000 also needs extra handling for large offsets
...
git-svn-id: trunk@28423 -
2014-08-16 15:14:34 +00:00
Károly Balogh
9b0bf91076
m68k: do not generate CLR instructions to memory references on plain 68k. there this instruction also causes reads from the address, which is slow and can have side effects.
...
git-svn-id: trunk@28422 -
2014-08-16 13:03:03 +00:00
Jonas Maebe
5c75b6dd6b
* synchronised with trunk up till r28402
...
git-svn-id: branches/hlcgllvm@28403 -
2014-08-13 16:04:30 +00:00
sergei
a28d6a84a7
+ m68k, a_load_const_reg: use MOV3Q if applicable for data registers as well, since it allows spilling replacement of destination.
...
+ a_load_const_ref: use CLR and MOV3Q if possible.
* a_cmp_reg_reg_label: force size to 32 bits for ISA_A and ISA_A+ targets.
+ support for stack frames larger than 32767 bytes.
git-svn-id: trunk@28298 -
2014-08-02 12:46:34 +00:00
sergei
499ff505c8
* m68k: further improved code generation for comparison nodes, support LOC_REFERENCE for 32-bit compares and omit low dword, when possible, for 64-bit ones.
...
git-svn-id: trunk@28297 -
2014-08-02 12:37:40 +00:00
sergei
b4d9d97a03
* m68k: don't do replace spilling if spilltemp.offset exceeds 16 bits on Coldfire targets.
...
git-svn-id: trunk@28296 -
2014-08-02 12:33:32 +00:00
sergei
3da5de0e5f
+ m68k, do_spill_replace: support more cases.
...
+ support spilling at offsets >32767, tested only to generate assemble-able code, support of large stack frames needs more changes elsewhere.
git-svn-id: trunk@28295 -
2014-08-01 20:32:48 +00:00
sergei
2c8264c42b
* m68k: partially improved code generation for comparisons.
...
git-svn-id: trunk@28283 -
2014-07-31 18:44:07 +00:00
sergei
01c8ee158d
- removed unused variables
...
git-svn-id: trunk@28282 -
2014-07-31 18:35:55 +00:00
sergei
a42ecadddf
+ m68k: implemented overflow checking (does not work for multiplication yet).
...
+ support references as source operands for 64-bit AND and OR operations.
git-svn-id: trunk@28275 -
2014-07-30 01:46:25 +00:00
sergei
9b9ea15d68
+ m68k: initial implementation of do_spill_replace (supports only MOVE instructions for now). Tested with qemu for Coldfire target.
...
git-svn-id: trunk@28274 -
2014-07-30 01:20:59 +00:00
sergei
bd5ce35130
* m68k: completely replaced 64-bit comparison code with a clone of i386 implementation. No optimizations yet, but it already makes system unit about 300 instructions shorter due to changing node location to LOC_JUMP.
...
* Cleaned up 32-bit comparison code and implemented one of the optimizations (TST instruction for comparison with constant zero which can act directly on references). This makes system unit shorter by about 1000 instructions.
git-svn-id: trunk@28260 -
2014-07-24 19:44:41 +00:00
sergei
dac52f503c
* m68k: fixed extension in a_load_ref_reg. Existing code cleans only bits 16-31 when loading a 8-bit register from 16-bit reference, and leaves garbage in bits 8-15.
...
git-svn-id: trunk@28256 -
2014-07-24 12:17:29 +00:00
sergei
b7da785688
* m68k: support stack cleanup at caller side, fixed calculation of pushed parameters size and offsets and cleaned out another pile of junk.
...
* Parameter offsets are now calculated similar to other targets, target_info,first_parm_offset is applied only to callee side, while at caller side offsets start from 0.
* For cdecl procedures, parameters are removed by caller, for the rest it's still done by callee (resembles i386 target, except there is no 'register' calling convention).
git-svn-id: trunk@28185 -
2014-07-08 19:08:56 +00:00
sergei
cfe13734e0
* m68k: Fixed damage caused by r27573 and r28177:
...
* longjmp: restored loading of function result (d0) which got removed in r28177.
* While at the point, added test for zero, because longjmp must never return zero values.
* Assembler reader: 'fp' refers to frame pointer, not the stack pointer.
git-svn-id: trunk@28183 -
2014-07-08 15:04:54 +00:00
sergei
df60309d96
* m68k: fixed the last remaining warning and removed "$WARNINGS OFF" directive.
...
git-svn-id: trunk@28176 -
2014-07-06 11:36:33 +00:00
Károly Balogh
e5656a6f7e
m68k assembler reader: fixed parsing of slash-separated movem/fmovem register lists. only the first register was stored.
...
git-svn-id: trunk@28174 -
2014-07-06 11:29:45 +00:00
sergei
1678fcdc2d
- m68k assembler reader: removed Oper.InitRef which was causing failure of tbs/tb0142.pp and, in general, making impossible calls/jumps to non-alias procedure names.
...
git-svn-id: trunk@28173 -
2014-07-06 10:35:35 +00:00
Jonas Maebe
7949bebb8d
* synchronised with r28168 of trunk
...
git-svn-id: branches/hlcgllvm@28169 -
2014-07-05 21:30:28 +00:00
Jonas Maebe
1516661249
+ new chlcgobj class reference variable that can be used to call thlcg*
...
virtual methods even when hlcg doesn't contain a valid instance
git-svn-id: branches/hlcgllvm@28143 -
2014-07-03 22:28:31 +00:00
sergei
b91d965096
* m68k: initial support for ROL/ROR operations, defining 'cpurox' for CPU target can actually enable them. However it cannot be done outright because these instructions do not exits on Coldfire, and internal processing of RoX,Sar,BsX, etc. can not yet be switched depending on CPU subtype.
...
git-svn-id: trunk@28101 -
2014-06-29 17:49:30 +00:00
sergei
15e374f3c6
* m68k: fixed comparison of small sets, it should not modify sides. tw18013 is now correct when compiled with -O2.
...
git-svn-id: trunk@28100 -
2014-06-29 12:35:03 +00:00
sergei
0262514939
* m68k: Transform 32-bit div/mod nodes into helper calls during pass 1. This is consistent with the way other targets do it, and results in pretty much nicer code.
...
git-svn-id: trunk@28098 -
2014-06-28 13:28:01 +00:00
sergei
535218e837
* m68k: fixed OP_NOT/OP_NEG with two registers, it must never modify the source register.
...
git-svn-id: trunk@28097 -
2014-06-28 05:22:03 +00:00
sergei
85c0ba96e2
* tm68knotnode brought up to speed:
...
- removed code for everything but booleans (it is handled perfectly well by generic code)
+ operate directly on references when possible
+ added handling for 64-bit data.
git-svn-id: trunk@28096 -
2014-06-28 05:14:27 +00:00
sergei
4df49964ca
* tcg68k.a_op_reg_reg: renamed parameters 'reg1' and 'reg2' to 'src' and 'dst' to make it clear what's what.
...
* tcg68k.fixref method made public.
git-svn-id: trunk@28095 -
2014-06-28 05:09:34 +00:00
sergei
c2ab16c320
- m68k: dropped t68kaddnode.second_cmpboolean, apparently its presence just breaks tbs/tb0246 without any value added.
...
git-svn-id: trunk@28090 -
2014-06-27 16:34:14 +00:00
sergei
193fa2b95e
- m68k: removed some definitely misplaced code, comparison nodes are never handled in second_addfloat.
...
git-svn-id: trunk@28087 -
2014-06-27 13:23:12 +00:00
sergei
3851c1f494
- m68k: removed a_loadmm_* methods, no need to override because they produce internal error already in base class.
...
git-svn-id: trunk@28086 -
2014-06-27 12:15:00 +00:00
sergei
acd3ea8750
* m68k: Fixed parameter passing to conform to ABI:
...
* records are passed by value
* records with size of 1,2 or 4 are returned in registers
* parameters with size<4 are justified on the stack according to big-endian target
Now everything except floating-point parameters is compatible with C code compiled with "-malign-int -mrtd".
Compatibility with "-mno-align-int" is achievable by changing target_info.maxCrecordalign to 2, but doings so causes a lot more troubles because RTL (incorrectly) assumes that records declared with {$PACKRECORDS C} are aligned to pointer size.
+ Reuse parameter locations. Since everything is passed on stack, it reduces code size quite a bit.
- tm68kparamanager.getintparaloc removed, generic implementation has been tested and works as expected.
git-svn-id: trunk@28083 -
2014-06-27 06:58:39 +00:00
Károly Balogh
5276de5627
m68k: restored orglen variable to g_concatcopy which was actually used, but still got removed in r28072
...
git-svn-id: trunk@28080 -
2014-06-26 19:46:57 +00:00
Károly Balogh
3028f3ac78
m68k: disabled PEA debug comment accidentally left in
...
git-svn-id: trunk@28077 -
2014-06-26 16:50:42 +00:00
Károly Balogh
d93e7b3367
m68k: cleaned ancient silly debug mess from a_loadaddr_ref_reg. no functional changes.
...
git-svn-id: trunk@28076 -
2014-06-26 16:47:55 +00:00
Károly Balogh
1388cb9bae
m68k: implemented a proper a_loadaddr_ref_cgpara instead of the disabled mess in the source, utilizing the PEA instruction
...
git-svn-id: trunk@28075 -
2014-06-26 16:39:17 +00:00
sergei
4c3eb391ef
* m68k: cleaned out unused variables in cgcpu.pas
...
* Fixed reference strength in a_call_reg.
git-svn-id: trunk@28072 -
2014-06-26 08:27:38 +00:00
sergei
3ffa32a660
- m68k: removed garbage (tab characters, commented out code, unused variables, debug output and alike). Functionality unchanged.
...
git-svn-id: trunk@28070 -
2014-06-26 06:01:29 +00:00
sergei
ad59098457
+ m68k: initial implementation of g_stackpointer_alloc method, it has to exist for targets with non-fixed stack.
...
git-svn-id: trunk@28064 -
2014-06-25 17:43:37 +00:00
Károly Balogh
531ac093ed
m68k: implemented a simple a_cmp_const_ref_label. uses TST instruction to test ref contents against zero
...
git-svn-id: trunk@28053 -
2014-06-25 06:56:58 +00:00
sergei
c79cd3beca
* m68k: fixed/completed the inverse_cond function.
...
git-svn-id: trunk@28052 -
2014-06-25 05:23:30 +00:00
Károly Balogh
519094055c
m68k: cleaned up and fixed cgcpu/fixref for coldfire at least; also enabled n68kmem node, so addressing with scaling is generated now
...
git-svn-id: trunk@28025 -
2014-06-21 21:36:48 +00:00
Károly Balogh
2881bc81b1
m68k: tweaks and fixes in n68kmem. the node is still disabled, needs further fixes in cgcpu/fixref to work properly
...
git-svn-id: trunk@28011 -
2014-06-20 11:49:38 +00:00
Károly Balogh
c6153010d1
m68k: plain 68000 doesn't support index scaling at all (020+ and CF only)
...
git-svn-id: trunk@27967 -
2014-06-15 12:28:51 +00:00
Károly Balogh
0045f34322
tabs to spaces and indentation fix, no functional changes
...
git-svn-id: trunk@27950 -
2014-06-14 09:09:53 +00:00
Károly Balogh
7963351440
m68k: removed comment generation line accidentally left in from the previous commit
...
git-svn-id: trunk@27936 -
2014-06-11 22:42:26 +00:00
Károly Balogh
ed3ce4087a
m68k: try to generate a bit smaller code in g_adjust_self; also changed two JMPs to S_NO from S_L, because JMP is unsized anyway
...
git-svn-id: trunk@27935 -
2014-06-11 22:33:09 +00:00
Károly Balogh
1b11541c90
m68k: simplification and cleanup of g_proc_entry. the generated code shouldn't change
...
git-svn-id: trunk@27922 -
2014-06-10 09:15:26 +00:00
Károly Balogh
17657ca11d
m68k: more minor reference usage tweaking, hopefully fixes Mantis 26286
...
git-svn-id: trunk@27880 -
2014-06-06 16:41:40 +00:00
Károly Balogh
381cf72023
m68k: minor bits, addq/subq works also on address regs, remove reference validity check in a_op_const_ref because we have fixref() later anyway
...
git-svn-id: trunk@27876 -
2014-06-06 15:15:03 +00:00
Károly Balogh
df7af34de9
m68k: very early optimizer implementation experiments
...
git-svn-id: trunk@27862 -
2014-06-06 07:38:50 +00:00
Károly Balogh
0fe656e82d
m68k: simplified code generated by g_concatcopy and cleaned up the old mess from the code
...
git-svn-id: trunk@27859 -
2014-06-05 12:42:36 +00:00
Károly Balogh
f3bbad26c3
m68k: use MOVEA without size to load values to address regs. use a_op_const_reg in a_op_const_ref for smarter const loading when necessary
...
git-svn-id: trunk@27828 -
2014-05-30 05:29:22 +00:00
Károly Balogh
2936335f68
removed silly ancient writeln debug from me...
...
git-svn-id: trunk@27821 -
2014-05-28 18:36:58 +00:00
Károly Balogh
28323135f8
m68k: minor optimizations to g_proc_exit() - use LEA for stackpointer math which is better than ADDing large constants, also only modify the SP reg once
...
git-svn-id: trunk@27817 -
2014-05-25 01:34:00 +00:00
Jonas Maebe
bacd303208
* synchronized with trunk up to r27758
...
git-svn-id: branches/hlcgllvm@27779 -
2014-05-12 16:12:34 +00:00
Károly Balogh
633eeb79ed
m68k/ra68kmot.pas: fixed a pointer to signed int cast warning, so it now compiles with warnings on
...
git-svn-id: trunk@27735 -
2014-05-04 22:22:03 +00:00
Károly Balogh
3b787b7187
m68k/ra68k.pas: fixed some multi level comment warnings, so it now compiles with warnings on
...
git-svn-id: trunk@27734 -
2014-05-04 22:21:24 +00:00
Károly Balogh
94d1a04422
m68k/cpuasm.pas was an empty and unused file since the first SVN commit. other platforms also doesn't have such file, so removed.
...
git-svn-id: trunk@27733 -
2014-05-04 21:51:15 +00:00
Károly Balogh
daefb42925
m68k: don't find helper 'opcodes' as real opcodes... (i guess is the right solution for the problem which r22796 originally aimed to fix)
...
git-svn-id: trunk@27577 -
2014-04-13 23:20:29 +00:00
Károly Balogh
9ad7540ddf
reverted change in r22796, the previously disabled code is actually required by the amunits package
...
git-svn-id: trunk@27574 -
2014-04-13 22:06:51 +00:00
Károly Balogh
5535df29d4
support SP and FP alias in the assembler reader too
...
git-svn-id: trunk@27573 -
2014-04-13 21:03:06 +00:00
Károly Balogh
7ee09b9620
instead of supporting SP only, have register A7 defined, and have SP as an alias
...
git-svn-id: trunk@27572 -
2014-04-13 21:02:16 +00:00
svenbarth
02495c17bd
Fix a typo. The CPU specific version of "ttypesym" should be called "tcputypesym" and not "tcpuypesym".
...
git-svn-id: trunk@27531 -
2014-04-11 14:30:59 +00:00
sergei
5c48804240
* Moved local label infrastructure into tasmreader, reduces number of global vars. Functionality is not changed.
...
git-svn-id: trunk@27477 -
2014-04-05 09:43:13 +00:00
Jonas Maebe
edff5a9aa1
* fixed m68k typo in r27438
...
git-svn-id: trunk@27443 -
2014-04-01 21:48:28 +00:00
Jonas Maebe
d452686c39
* moved pbestrealtype from symdef to symcpu
...
git-svn-id: trunk@27441 -
2014-04-01 21:41:37 +00:00
Jonas Maebe
9c7c64a3af
* moved amiga/morphos-specific libsym-related field from tprocdef to
...
cpu-specific descendants (unfortunately causes some duplication, but the
code is trivial and there is no easy way to avoid it)
* also moved the use of the field in ncal to cpu-specific files (with same
caveat)
git-svn-id: trunk@27438 -
2014-04-01 21:41:27 +00:00
Jonas Maebe
dae5d1ff62
+ added class reference types of the architecture-specific t*def/t*sym
...
classes
git-svn-id: trunk@27396 -
2014-03-30 21:04:32 +00:00
Jonas Maebe
b57c95043f
+ support overriding tdef/tsym methods with target-specific functionality:
...
o made all (non-abstract) tdef and tsym constructors virtual
o added c*def/c*sym classref types for every (non-abstract) t*def/t*sym
class
o added cpusym unit for every architecture that derives a tcpu*def/tcpu*sym
class from the base classes, and initialises the c*def/c*sym classes with
them. This is done so that the llvm target will be able to derive from
the tcpu*def/sym classes without umpteen ifdefs, and it also means that
the WPO can devirtualise everything because the c* variables are only
initialised with one class type
o replaced all t*def/t*sym constructor calls with c*def/c*sym constructor
calls
git-svn-id: trunk@27361 -
2014-03-29 22:31:55 +00:00
Károly Balogh
3b9e2a620b
added a remark about a possible QEMU issue with CMP/CMPI .W and .B on ColdFire
...
git-svn-id: trunk@27291 -
2014-03-26 17:08:16 +00:00
Károly Balogh
1af6d17b4d
don't enforce BPL length, use SUBQ in g_concatcopy
...
git-svn-id: trunk@27290 -
2014-03-26 15:43:25 +00:00
Károly Balogh
9ae38cdc1c
back to more conservative sign extension. this really needs separate handling for ColdFire and normal 68k, because the CF executes 32bit arithmetics only while normal 68k will do any size happily.
...
git-svn-id: trunk@27289 -
2014-03-26 15:02:50 +00:00
Károly Balogh
7093efe4c4
fixed comment, no functional changes
...
git-svn-id: trunk@27266 -
2014-03-24 16:53:29 +00:00
Károly Balogh
ed56f3c9b1
disable the new n68kmem node for now, it needs more fixing
...
git-svn-id: trunk@27123 -
2014-03-13 02:08:15 +00:00
Károly Balogh
bca09a8f69
reverted parts of r27117 because it caused regressions
...
git-svn-id: trunk@27118 -
2014-03-12 19:22:04 +00:00
Károly Balogh
c7d1cef334
support sign/zero extension to subreg sizes, not just always to 32bit
...
git-svn-id: trunk@27117 -
2014-03-12 18:27:50 +00:00
Károly Balogh
73db4db6f8
use the whole reg for return values
...
git-svn-id: trunk@27116 -
2014-03-12 18:22:04 +00:00
Károly Balogh
552ab2938e
avoid some unnecessary sign extensions
...
git-svn-id: trunk@27111 -
2014-03-12 04:16:52 +00:00
Károly Balogh
48ceebafb1
n68kmem node for better utilization of 68k specialities in addressing
...
git-svn-id: trunk@27110 -
2014-03-12 02:36:40 +00:00
Károly Balogh
3a464dbdcf
don't swap the base and index registers if we have a scalefactor
...
git-svn-id: trunk@27109 -
2014-03-12 02:34:30 +00:00
Károly Balogh
7b05113322
addressing improvements: fixref can swap base/index registers if better fits 68k pattern, less need to move around registers. also fix reference in a_op_const_ref.
...
git-svn-id: trunk@27108 -
2014-03-12 01:32:44 +00:00