From 3c015cdfccfc5bce6bcce94da5e25972d7b09fb4 Mon Sep 17 00:00:00 2001 From: Duncan Smith Date: Sat, 12 Jun 2010 15:38:33 -0700 Subject: I'm not sure where this changeset came from, but it looks good ... --- main.asm | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index 507e8ef..c4197bc 100644 --- a/main.asm +++ b/main.asm @@ -157,26 +157,22 @@ HILO MACRO ; 22 cycles, 2 bytes rol.w #8,\1 ENDM + ;; calc84maniac suggests putting emu_fetch into this in order ;; to save 8 cycles per instruction, at the expense of code ;; size -DONE MACRO ; 8 cycles, 2 bytes - jmp (a2) + ;; + ;; See if I can get rid of the eor +DONE MACRO + eor.w d0,d0 ; 4 cycles + move.b (a4)+,d0 ; 8 cycles + rol.w #5,d0 ; 4 cycles adjust to actual alignment + jmp 0(a3,d0) ;14 cycles + ;; overhead: 30 cycles ENDM ;; == Special Opcode Macros ======================================== - ;; Do a SUB \2,\1 -F_SUB_B MACRO ;14 bytes? -;; XXX use lea and then d(an) if you have a spare register. - move.b \1,f_tmp_src_b ; preserve operands for flagging - move.b \2,f_tmp_dst_b - move.b #1,flag_n - move.b #1,f_tmp_byte - sub \1,\2 - move sr,f_host_ccr - ENDM - ;; Do an ADD \1,\2 F_ADD_W MACRO @@ -1448,6 +1444,22 @@ emu_op_8f: F_ADD_B d3,d3 DONE + + + + + ;; Do a SUB \2,\1 + ;; XXX CHECK +F_SUB_B MACRO ;14 bytes? + ;; XXX use lea and then d(an) if you have a spare register. + move.b \1,f_tmp_src_b ; preserve operands for flagging + move.b \2,f_tmp_dst_b + move.b #1,flag_n + move.b #1,f_tmp_byte + sub \1,\2 + move sr,f_host_ccr + ENDM + START emu_op_90: ;; SUB A,B -- cgit v1.2.3