summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Smith2010-06-12 15:38:33 -0700
committerDuncan Smith2010-06-12 15:38:33 -0700
commit3c015cdfccfc5bce6bcce94da5e25972d7b09fb4 (patch)
tree021a551f4a83592ce30bafeec316e1b5a974a366
parent9c10017f438814094c33d19c4387a7e60e627c3b (diff)
I'm not sure where this changeset came from, but it looks good ...
-rw-r--r--main.asm38
1 files changed, 25 insertions, 13 deletions
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