From 28a2336aae0dc4e9eb43c5c2a2846292667784e8 Mon Sep 17 00:00:00 2001 From: TomW Date: Sun, 3 May 2015 14:42:34 +0100 Subject: [PATCH] MOV DRx now loads/stores from 'dummy' DRx registers (BeOS). --- src/ibm.h | 1 + src/x86_ops_mov_ctrl.h | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ibm.h b/src/ibm.h index 26aed41..a167c53 100644 --- a/src/ibm.h +++ b/src/ibm.h @@ -155,6 +155,7 @@ union #define msw CR0.w uint32_t cr2, cr3, cr4; +uint32_t dr[8]; #define C_FLAG 0x0001 #define P_FLAG 0x0004 diff --git a/src/x86_ops_mov_ctrl.h b/src/x86_ops_mov_ctrl.h index 9213080..b276e80 100644 --- a/src/x86_ops_mov_ctrl.h +++ b/src/x86_ops_mov_ctrl.h @@ -80,7 +80,7 @@ static int opMOV_r_DRx_a16(uint32_t fetchdat) return 1; } fetch_ea_16(fetchdat); - regs[rm].l = 0; + regs[rm].l = dr[reg]; CLOCK_CYCLES(6); return 0; } @@ -93,7 +93,7 @@ static int opMOV_r_DRx_a32(uint32_t fetchdat) return 1; } fetch_ea_32(fetchdat); - regs[rm].l = 0; + regs[rm].l = dr[reg]; CLOCK_CYCLES(6); return 0; } @@ -188,6 +188,7 @@ static int opMOV_DRx_r_a16(uint32_t fetchdat) return 1; } fetch_ea_16(fetchdat); + dr[reg] = regs[rm].l; CLOCK_CYCLES(6); return 0; } @@ -200,6 +201,7 @@ static int opMOV_DRx_r_a32(uint32_t fetchdat) return 1; } fetch_ea_16(fetchdat); + dr[reg] = regs[rm].l; CLOCK_CYCLES(6); return 0; }