Commit Graph

110 Commits

Author SHA1 Message Date
florian
637976e83f * patch by Marģers to unify internal error numbers, resolves #37888
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +00:00
pierre
dfdfbf896d Fix several warnings about uninitialized local variables
git-svn-id: trunk@45787 -
2020-07-15 08:59:59 +00:00
nickysn
d88da03e7d * z80: use the JRJP pseudo instruction to generate shorter code (it is
translated to JR wherever possible, otherwise to JP)

git-svn-id: trunk@45510 -
2020-05-26 19:52:27 +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
cfb28c7654 * fixed bug, causing the global variable stacksize to be destroyed
git-svn-id: trunk@45171 -
2020-04-29 02:00:26 +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
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
nickysn
7957560fba + implemented tcgz80.a_adjust_sp
git-svn-id: branches/z80@45116 -
2020-04-26 17:04:15 +00:00
nickysn
723faf14a9 - removed GetByteLoc, because it isn't used
git-svn-id: branches/z80@45113 -
2020-04-26 16:44:14 +00:00
nickysn
ff0c771e2e - removed unused local vars
git-svn-id: branches/z80@45112 -
2020-04-26 16:42:19 +00:00
nickysn
9b9197c06e * formatting
git-svn-id: branches/z80@45111 -
2020-04-26 16:42:03 +00:00
nickysn
5de66f75a0 - removed commented out code from tcgz80.a_cmp_reg_reg_label
git-svn-id: branches/z80@45110 -
2020-04-26 16:41:44 +00:00
nickysn
ab8f9cc707 - removed commented out code from tcgz80.done_register_allocators
git-svn-id: branches/z80@45109 -
2020-04-26 16:40:52 +00:00
nickysn
1713176078 - removed commented out code from tcgz80.a_load_reg_cgpara
git-svn-id: branches/z80@45108 -
2020-04-26 16:40:21 +00:00
nickysn
3d5452cda3 - removed commented out code from tcgz80.a_load_ref_cgpara
git-svn-id: branches/z80@45107 -
2020-04-26 16:39:36 +00:00
nickysn
ab6d9e9df9 - removed tcgz80.maybegetcpuregister, because it isn't used
git-svn-id: branches/z80@45106 -
2020-04-26 16:38:29 +00:00
nickysn
05ca71133f + implemented OP_MUL/OP_IMUL in tcgz80.a_op_reg_reg_internal
git-svn-id: branches/z80@45105 -
2020-04-26 16:37:53 +00:00
nickysn
b15c66b396 * fixed tcgz80.a_call_reg
git-svn-id: branches/z80@45062 -
2020-04-25 11:06:58 +00:00
nickysn
4b88e8f48e * fixed label placement in tcgz80.a_cmp_const_reg_label for 16-bit/32-bit operations OC_GT,OC_LT,OC_GTE,OC_LTE,OC_BE,OC_B,OC_AE,OC_A
git-svn-id: branches/z80@45061 -
2020-04-25 09:44:34 +00:00
nickysn
4a0ad586d0 + implemented record copy in tcgz80.a_load_ref_cgpara
git-svn-id: branches/z80@45035 -
2020-04-23 03:14:09 +00:00
nickysn
992602afcb * fixed 64-bit OP_NOT
git-svn-id: branches/z80@45034 -
2020-04-23 03:10:39 +00:00
nickysn
89b8bd3848 + added a Z80-specific override for tcgz80.a_loadfpu_ref_cgpara, to support returning single results
in registers

git-svn-id: branches/z80@45024 -
2020-04-23 02:29:46 +00:00
nickysn
088cfd5da5 * write a warning in the assembler output, instead of stopping with an internal error in
tcgz80.a_op_reg_reg_internal for OP_MUL/OP_IMUL, so that more RTL code can be compiled

git-svn-id: branches/z80@45022 -
2020-04-23 02:07:25 +00:00
nickysn
770822382f + implemented all the remaining 16-bit and 32-bit comparisons in tcgz80.a_cmp_const_reg_label
git-svn-id: branches/z80@45019 -
2020-04-23 00:57:21 +00:00
nickysn
d54a2b7cb6 * generate an internal error in tcgz80.a_cmp_reg_reg_label, because that's not yet implemented
git-svn-id: branches/z80@45018 -
2020-04-23 00:40:23 +00:00
nickysn
38d3bdc60e + allow fromsize>tosize in tcgz80.a_load_ref_reg
git-svn-id: branches/z80@45017 -
2020-04-23 00:36:22 +00:00
nickysn
9c461d90bd + handle ref.base=NR_HL/NR_BC/NR_SP in tcgz80.a_loadaddr_ref_reg
git-svn-id: branches/z80@45009 -
2020-04-22 22:37:20 +00:00
nickysn
3014378ad2 + support OS_32,OS_S32 in tcgz80.a_load_reg_cgpara
git-svn-id: branches/z80@45006 -
2020-04-22 22:04:15 +00:00
nickysn
3d89d72621 * fixed 64-bit AND/OR/XOR in tcgz80.a_op_reg_reg_internal
git-svn-id: branches/z80@45005 -
2020-04-22 21:58:43 +00:00
nickysn
e7f707cd78 + fixed 64-bit OP_NEG in a_op_reg_reg_internal
git-svn-id: branches/z80@45004 -
2020-04-22 21:48:42 +00:00
nickysn
ccd23d288d * handle same size, but different sign conversions properly in tcgz80.a_load_reg_ref,.a_load_ref_reg,.a_load_reg_reg
git-svn-id: branches/z80@45003 -
2020-04-22 21:42:00 +00:00
nickysn
4d875acdf1 + support OS_32 and OS_S32 in tcgz80.a_load_ref_cgpara
git-svn-id: branches/z80@45002 -
2020-04-22 21:09:03 +00:00
nickysn
0b3b8401df + implemented tcgz80.a_jmp_cond
git-svn-id: branches/z80@44997 -
2020-04-22 16:10:23 +00:00
nickysn
9ad3de966f + handle IX and IY-based references in tcgz80.normalize_ref
git-svn-id: branches/z80@44987 -
2020-04-22 02:27:07 +00:00
nickysn
fec0f346f1 + partially implemented tcgz80.a_cmp_const_reg_label: all 8-bit comparison ops are implemented, and
also OP_EQ, OP_NE for 16-bit and 32-bit operands

git-svn-id: branches/z80@44983 -
2020-04-22 01:18:02 +00:00
nickysn
ce8ed9efa8 + added another helper tcgz80.a_jmp_signed_cmp_3way
git-svn-id: branches/z80@44979 -
2020-04-21 22:48:44 +00:00
nickysn
027217d1fe * fixed an OP_SUB bug in tcgz80.a_op_const_reg_internal
git-svn-id: branches/z80@44977 -
2020-04-21 22:05:02 +00:00
nickysn
a714a2fb76 + added a jmp helper that handles all possible combinations of jump on below, equal and above (unsigned comparison)
git-svn-id: branches/z80@44975 -
2020-04-21 21:38:15 +00:00
nickysn
c67fa28d7c * use a LD sequence for 2-byte moves as well in tcgz80.g_concatcopy
git-svn-id: branches/z80@44961 -
2020-04-21 16:26:04 +00:00
nickysn
f8b0c24024 + support pushing word-sized parameters in a_load_reg_cgpara
git-svn-id: branches/z80@44911 -
2020-04-21 03:48:36 +00:00
nickysn
2f68090dd6 * synchronized with trunk
git-svn-id: branches/z80@44898 -
2020-04-20 22:42:08 +00:00
nickysn
557a481743 + use normalize_ref in tcgz80.a_load_ref_reg
git-svn-id: branches/z80@44897 -
2020-04-20 21:44:36 +00:00
nickysn
bee3e9c354 + make use of normalize_ref in tcgz80.a_load_reg_ref
git-svn-id: branches/z80@44895 -
2020-04-20 21:34:10 +00:00
nickysn
a7b69cd18b - removed make_simple_ref, because normalize_ref should be used instead
git-svn-id: branches/z80@44894 -
2020-04-20 20:52:07 +00:00
nickysn
0d6e59e9ef + actually return the proper (HL) reference result in tcgz80.normalize_ref
git-svn-id: branches/z80@44893 -
2020-04-20 20:49:45 +00:00
nickysn
5c138c341f + added an output parameter to tcgz80.normalize_ref, that returns a list of the registers that were
actually used, so they can be freed after the reference is used.

git-svn-id: branches/z80@44892 -
2020-04-20 20:46:30 +00:00
nickysn
fc991af9d1 + added tregisterlist - dynarray of tregister, and methods get/uncpuregisters for allocating/freeing
a dynamic list of registers

git-svn-id: branches/z80@44891 -
2020-04-20 20:42:16 +00:00
nickysn
882522259e + initial implementation of tcgz80.normalize_ref
git-svn-id: branches/z80@44890 -
2020-04-20 20:27:08 +00:00