From 64f12ea81036c0d11c22c99ade4a4d58f3e924f5 Mon Sep 17 00:00:00 2001 From: shashclp Date: Thu, 18 Jan 2007 04:00:25 +0000 Subject: [PATCH] - Fixed MOV according to documentation, fixes armwrestler first page Reference: http://nocash.emubase.de/gbatek.htm#arm5dataprocessing (undex Using R15) --- desmume/src/arm_instructions.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desmume/src/arm_instructions.c b/desmume/src/arm_instructions.c index 8c2e79c61..a70056be0 100644 --- a/desmume/src/arm_instructions.c +++ b/desmume/src/arm_instructions.c @@ -2171,6 +2171,7 @@ static u32 FASTCALL OP_MOV_LSL_REG(armcpu_t *cpu) { u32 i = cpu->instruction; LSL_REG; + if (REG_POS(i,0) == 15) shift_op += 4; OP_MOV(2,4); } @@ -2186,6 +2187,7 @@ static u32 FASTCALL OP_MOV_LSR_REG(armcpu_t *cpu) { u32 i = cpu->instruction; LSR_REG; + if (REG_POS(i,0) == 15) shift_op += 4; OP_MOV(2,4); } @@ -2237,6 +2239,7 @@ static u32 FASTCALL OP_MOV_S_LSL_REG(armcpu_t *cpu) { u32 i = cpu->instruction; S_LSL_REG; + if (REG_POS(i,0) == 15) shift_op += 4; OP_MOV_S(3,5); } @@ -2251,6 +2254,7 @@ static u32 FASTCALL OP_MOV_S_LSR_REG(armcpu_t *cpu) { u32 i = cpu->instruction; S_LSR_REG; + if (REG_POS(i,0) == 15) shift_op += 4; OP_MOV_S(3,5); }