Commit Graph

23384 Commits

Author SHA1 Message Date
nickysn
c0ffa18ee2 + added class TRelObjOutput
git-svn-id: trunk@45195 -
2020-04-30 17:31:18 +00:00
nickysn
19c1ecda54 + started work on the Z80 internal assembler
git-svn-id: trunk@45191 -
2020-04-30 14:27:48 +00:00
nickysn
9b1eebd333 + z80: add operand info to the result of taicpu.GetString, this makes the
compiler produce nicer error messages, when it encounters an invalid
  instruction in inline asm code

git-svn-id: trunk@45187 -
2020-04-30 00:17:29 +00:00
nickysn
2f4390ac9b + added Z80 inline asm instruction validation
git-svn-id: trunk@45186 -
2020-04-29 23:51:23 +00:00
nickysn
34112c932c + handle OT_IMM8 and OT_IMM16 for getting symbol addresses in taicpu.Matches
git-svn-id: trunk@45185 -
2020-04-29 23:45:09 +00:00
nickysn
a79d12ae41 + handle OT_RELJMP8 in taicpu.Matches
git-svn-id: trunk@45184 -
2020-04-29 23:39:47 +00:00
nickysn
4c021c100a + handle OT_REG8_C_PORT in taicpu.Matches
git-svn-id: trunk@45183 -
2020-04-29 23:30:43 +00:00
nickysn
a063a53863 + handle OT_IMM_PORT in taicpu.Matches
git-svn-id: trunk@45182 -
2020-04-29 23:23:20 +00:00
nickysn
552107f577 + z80: implemented taicpu.CheckIfValid
git-svn-id: trunk@45181 -
2020-04-29 22:21:40 +00:00
nickysn
d5b8e49da2 + z80: implemented taicpu.FindInsentry
git-svn-id: trunk@45180 -
2020-04-29 22:12:51 +00:00
nickysn
5e90aa27d5 - z80: oops, forgot to delete some code from taicpu.Matches
git-svn-id: trunk@45179 -
2020-04-29 21:46:42 +00:00
nickysn
e08c7b3642 + z80: added condition checking in taicpu.Matches
git-svn-id: trunk@45178 -
2020-04-29 21:38:41 +00:00
florian
9e0337f248 * do not use an extra register in tcginlinenode.second_IncDec if not needed
git-svn-id: trunk@45177 -
2020-04-29 20:01:53 +00:00
nickysn
7f769f024b * Z80: fixed code generation for pure assembler routines, that have no parameters, no local variables
and no 'nostackframe'

git-svn-id: trunk@45176 -
2020-04-29 19:44:57 +00:00
nickysn
365e320119 + partial implementation of taicpu.Matches
git-svn-id: trunk@45175 -
2020-04-29 16:25:52 +00:00
nickysn
20e2a0efac + added Z80 register AF'
git-svn-id: trunk@45174 -
2020-04-29 16:00:25 +00:00
nickysn
6654faea08 + build an instruction table cache for the Z80
git-svn-id: trunk@45173 -
2020-04-29 14:53:21 +00:00
nickysn
f8c2d4a632 * added comment, stating that Z80 has no condition subsets
git-svn-id: trunk@45172 -
2020-04-29 12:19:59 +00:00
nickysn
cfb28c7654 * fixed bug, causing the global variable stacksize to be destroyed
git-svn-id: trunk@45171 -
2020-04-29 02:00:26 +00:00
Károly Balogh
695a260ff8 zxspectrum: added support for linking via vlink, and for pascal sysinit code. also some cleanup in the linker code
git-svn-id: trunk@45169 -
2020-04-29 01:32:48 +00:00
Károly Balogh
60c73dd14b z80: fix typo in the previous commit
git-svn-id: trunk@45164 -
2020-04-28 23:10:35 +00:00
Károly Balogh
04bd105cf5 z80: fix global symbols and section attributes in the vasm writer
git-svn-id: trunk@45163 -
2020-04-28 23:10:03 +00:00
florian
50c221670f * do not generate moves unncesssarily in tcgloadparentfpnode.pass_generate_code
git-svn-id: trunk@45162 -
2020-04-28 21:25:42 +00:00
nickysn
86e04ddd5c + enable the sdasz80 lameness check permanently, because the system unit now
compiles, and it's important to catch other similar errors also

git-svn-id: trunk@45158 -
2020-04-28 19:34:38 +00:00
nickysn
07a8af33b1 + z80: generate correct code in do_spill_read and do_spill_written for spilling to temp offsets outside the range -128..127
git-svn-id: trunk@45157 -
2020-04-28 19:31:11 +00:00
nickysn
6dbe1368ef + z80: added range checking for d in the (IX+d) and (IY+d) addressing modes in
the sdasz80 assembler writer, because sdasz80 silently truncates d to shortint
  which produces broken code and hides bugs in the z80 code generator. The check
  is behind ifdef, because the system unit doesn't compile, when this check is
  enabled, due to bugs that were previously unnoticed. When these bugs are
  fixed, the ifdef will be removed.

git-svn-id: trunk@45156 -
2020-04-28 18:49:50 +00:00
marcus
589b2b956f Fixed LLVM compilation after r45143
git-svn-id: trunk@45155 -
2020-04-28 18:41:45 +00:00
pierre
a506fe9560 Fix cross-compilation on aarch64-linux using -dFPC_SOFT_FPUX80 option
git-svn-id: trunk@45154 -
2020-04-28 18:35:53 +00:00
nickysn
573d69c8fe * unfortunately tf_smartlink_sections is mutually exclusive with
tf_smartlink_library, and defining both breaks sdasz80, so put this behind
  ifdef Z80_SMARTLINK_SECTIONS

git-svn-id: trunk@45153 -
2020-04-28 15:14:39 +00:00
Károly Balogh
23fc0fe66a z80: added quick & dirty vasm assembler support to the target
git-svn-id: trunk@45152 -
2020-04-28 01:23:31 +00:00
Károly Balogh
db1ef439b5 z80: sdasz80 won't do section smartlinking for us, but it's used for the zx spectrum target
git-svn-id: trunk@45151 -
2020-04-28 01:17:29 +00:00
nickysn
491462fd02 + added another helper for register pairs: register_in
git-svn-id: trunk@45150 -
2020-04-28 00:18:49 +00:00
nickysn
a5d36e1bc6 + added Z80 helper functions is_regpair and split_regpair
git-svn-id: trunk@45149 -
2020-04-28 00:05:53 +00:00
nickysn
69c95115f6 - removed GetHigh, GetNextReg, GetLastReg, GetOffsetReg and GetOffsetReg64 from cpubase. The methods
in cg should be used instead, because they do better error checking on the register used.

git-svn-id: trunk@45147 -
2020-04-27 22:03:36 +00:00
nickysn
29d681168a * merged the z80 branch
git-svn-id: trunk@45143 -
2020-04-27 20:07:54 +00:00
florian
a084c8829f * patch by J. Gareth Moreton: refactor RemoveCurrentP
git-svn-id: trunk@45142 -
2020-04-27 19:27:16 +00:00
florian
e7f7927ca9 + initialize variables, so compilation with -O3 works
git-svn-id: trunk@45141 -
2020-04-27 19:19:54 +00:00
nickysn
a857e60dc1 * tsystemcpu.cpu_sys_z80 renamed .cpu_z80 for consistency with the other values in the enum.
git-svn-id: branches/z80@45140 -
2020-04-27 15:50:29 +00:00
nickysn
9cca44d3af * tcputype.cpu_ez80 renamed .cpu_zilog_ez80
git-svn-id: branches/z80@45139 -
2020-04-27 15:49:14 +00:00
nickysn
784237ee33 * tcputype.cpu_z80 renamed .cpu_zilog_z80
git-svn-id: branches/z80@45138 -
2020-04-27 15:47:52 +00:00
nickysn
25a42c6469 * update msg
git-svn-id: branches/z80@45132 -
2020-04-26 22:36:51 +00:00
nickysn
6f6598712f * synchronized with trunk
git-svn-id: branches/z80@45131 -
2020-04-26 22:33:58 +00:00
nickysn
368f4412c4 * handle nf_swapped properly in TZ80AddNode.second_cmp16_32_64bit
git-svn-id: branches/z80@45128 -
2020-04-26 22:09:37 +00:00
nickysn
647725ea0c * optimizations in tcgz80.normalize_ref
git-svn-id: branches/z80@45127 -
2020-04-26 21:36:13 +00:00
nickysn
5a5a8602d3 * optimization in tcgz80.a_load_const_cgpara for pushing longints, where the low 16 bits are equal
to the high 16 bits (works for e.g. 0)

git-svn-id: branches/z80@45126 -
2020-04-26 21:12:15 +00:00
nickysn
3338603bb8 * generate better code in tcgz80.a_loadaddr_ref_reg
git-svn-id: branches/z80@45125 -
2020-04-26 20:58:52 +00:00
florian
db9a284d60 * simplify xtensa-linux building
git-svn-id: trunk@45124 -
2020-04-26 20:54:22 +00:00
nickysn
5be4ce281f * don't reorder LOC_REFERENCE parameters on the Z80 also
git-svn-id: branches/z80@45122 -
2020-04-26 19:49:17 +00:00
nickysn
44d95ef7c8 + generate better code in op_const_reg for OP_ADD and OP_SUB by using in certain cases A_DEC for OP_SUB
and A_INC for OP_ADD

git-svn-id: branches/z80@45120 -
2020-04-26 17:24:53 +00:00
florian
8ef29235c3 * Xtensa: set source_cpu_string
git-svn-id: trunk@45117 -
2020-04-26 17:23:24 +00:00