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
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
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