From 76720f7ff171a7d13d010d7f0af1ae546f781c9c Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 29 Feb 2012 02:02:07 +0200 Subject: [PATCH] gte_arm: fix gteOF sign extension --- libpcsxcore/gte_arm.s | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libpcsxcore/gte_arm.s b/libpcsxcore/gte_arm.s index 239d1ea0..8700f69c 100644 --- a/libpcsxcore/gte_arm.s +++ b/libpcsxcore/gte_arm.s @@ -186,10 +186,10 @@ gteRTPS_nf_arm: movhs r9, #0x20000 ldmia r1, {r2-r4} /* quotient */ subhs r9, #1 - mov r2, #0 + mov r2, r6, asr #31 smlal r6, r2, r10, r9 stmia r1!,{r3,r4} @ shift gteSXY - mov r3, #0 + mov r3, r7, asr #31 smlal r7, r3, r11, r9 lsr r6, #16 /* gteDQA, gteDQB */ ldrd r10,[r0, #4*(32+27)] @@ -253,9 +253,9 @@ rtpt_arm_loop: movhs r9, #0x20000 ldrd r6, [r0,#4*(32+24)] @ gteOFXY /* quotient */ subhs r9, #1 - mov r2, #0 + mov r2, r6, asr #31 smlal r6, r2, r10, r9 - mov r3, #0 + mov r3, r7, asr #31 smlal r7, r3, r11, r9 lsr r6, #16 orr r6, r2, lsl #16 @ (gteOFX + gteIR1 * q) >> 16 -- 2.39.5