From 7c4dfba9781829b2825ebbdddca1531079d7adcc Mon Sep 17 00:00:00 2001 From: Astrid Smith Date: Mon, 2 Aug 2010 18:59:25 -0700 Subject: HACK XXX UNDO LATER Made relative flag references absolute. A68k wanted to add relocations, but couldn't figure out how. Undo this later when it's speed time, as this (probably) slows things down a bit. --- alu.asm | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/alu.asm b/alu.asm index 4f89f52..5eb79de 100644 --- a/alu.asm +++ b/alu.asm @@ -7,10 +7,10 @@ alu_add: ;; d1 + d0 -> d1 move.b d0,f_tmp_src_b ; preserve operands for flag work move.b d1,f_tmp_dst_b - move.b #1,(f_tmp_byte-flag_storage)(a3) + move.b #1,f_tmp_byte add d0,d1 - move sr,(f_host_sr-flag_storage)(a3) - move.w #0202,(flag_byte-flag_storage)(a3) + move sr,f_host_sr + move.w #0202,flag_byte rts alu_adc: @@ -21,11 +21,11 @@ alu_adc: move.b flag_byte(pc),d2 andi.b #1,d2 add.b d0,d2 - move.b d2,(f_tmp_src_b-flag_storage)(a3) - move.b d1,(f_tmp_dst_b-flag_storage)(a3) + move.b d2,f_tmp_src_b + move.b d1,f_tmp_dst_b add.b d2,d1 - move sr,(f_host_ccr-flag_storage)(a3) - move.w #$0202,(flag_byte-flag_storage)(a3) + move sr,f_host_ccr + move.w #$0202,flag_byte rts alu_sbc: @@ -39,12 +39,12 @@ alu_sbc: move.b flag_byte(pc),d2 andi.b #1,d2 add.b d0,d2 - move.b d2,(f_tmp_src_b-flag_storage)(a3) - move.b d1,(f_tmp_dst_b-flag_storage)(a3) + move.b d2,f_tmp_src_b + move.b d1,f_tmp_dst_b sub.b d2,d1 - move sr,(f_host_sr-flag_storage)(a3) - move.b #$02,(flag_byte-flag_storage)(a3) - move.b #$02,(flag_valid-flag_storage)(a3) + move sr,f_host_sr + move.b #$02,flag_byte + move.b #$02,flag_valid pop.l d2 rts @@ -57,13 +57,13 @@ alu_sub: ;; XXX use lea and then d(an) if you have a spare register. ;; preserve operands for flagging - move.b d0,(f_tmp_src_b-flag_storage)(a3) - move.b d1,(f_tmp_dst_b-flag_storage)(a3) - move.b #1,(f_tmp_byte-flag_storage)(a3) - andi.b #%00000010,(flag_valid-flag_storage)(a3) - move.b #%00000010,(flag_byte-flag_storage)(a3) + move.b d0,f_tmp_src_b + move.b d1,f_tmp_dst_b + move.b #1,f_tmp_byte + andi.b #%00000010,flag_valid + move.b #%00000010,flag_byte sub d0,d1 - move sr,(f_host_sr-flag_storage)(a3) + move sr,f_host_sr rts alu_and: @@ -81,11 +81,11 @@ alu_or: alu_cp: ;; Same as SUB but the macro that calls this doesn't save the ;; result. - move.b d0,(f_tmp_src_b-flag_storage)(a3) - move.b d1,(f_tmp_dst_b-flag_storage)(a3) - move.b #1,(f_tmp_byte-flag_storage)(a3) - andi.b #%00000010,(flag_valid-flag_storage)(a3) - move.b #%00000010,(flag_byte-flag_storage)(a3) + move.b d0,f_tmp_src_b + move.b d1,f_tmp_dst_b + move.b #1,f_tmp_byte + andi.b #%00000010,flag_valid + move.b #%00000010,flag_byte sub d0,d1 - move sr,(f_host_sr-flag_storage)(a3) + move sr,f_host_sr rts -- cgit v1.2.3