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