From 3fe18a0168bc2ae30b522af1e9feff5172d2b281 Mon Sep 17 00:00:00 2001 From: Astrid Smith Date: Fri, 18 Jun 2010 17:26:59 -0700 Subject: First go at flags_normalize --- flags.asm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/flags.asm b/flags.asm index a6ecaaa..ac51b01 100644 --- a/flags.asm +++ b/flags.asm @@ -113,11 +113,17 @@ FNsign_ok: ;; Preconditions: ;; Flags to change are noted in d0 by a 1 bit flags_normalize: - move.b f_host_ccr-flag_storage(a3),d1 ; 8/4 + move.b f_host_ccr(pc),d1 ; 8/4 ;; .w keeps d1 clean andi.w #%00011111,d1 ; 8/4 move.b lut_ccr(pc,d1.w),d1 ; 10/4 - ;; XXX do this + move.b flag_valid(pc),d0 + not.b d0 + and.b d0,d1 ; Mask out all the unwanted bits + not.b d0 + ori.b #%11000101,d0 + move.b d0,flag_valid-flag_storage(a3) + or.b d1,flag_byte-flag_storage(a3) rts flag_storage: -- cgit v1.2.3