From 0c7cc657cc3ef0b11330f51e96ca851393acbcec Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Mon, 23 Dec 2024 15:25:29 +0800 Subject: [LA64_DYNAREC] Fixed 32bit ADDIz and SUBz (#2191) --- src/dynarec/la64/la64_emitter.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/dynarec/la64/la64_emitter.h b/src/dynarec/la64/la64_emitter.h index 86cf334b..70e28922 100644 --- a/src/dynarec/la64/la64_emitter.h +++ b/src/dynarec/la64/la64_emitter.h @@ -2069,9 +2069,10 @@ LSX instruction starts with V, LASX instruction starts with XV. #define ADDIz(rd, rj, imm12) \ do { \ - if (rex.is32bits) \ + if (rex.is32bits) { \ ADDI_W(rd, rj, imm12); \ - else \ + ZEROUP(rd); \ + } else \ ADDI_D(rd, rj, imm12); \ } while (0) @@ -2164,9 +2165,10 @@ LSX instruction starts with V, LASX instruction starts with XV. #define SUBz(rd, rj, rk) \ do { \ - if (rex.is32bits) \ + if (rex.is32bits) { \ SUB_W(rd, rj, rk); \ - else \ + ZEROUP(rd); \ + } else \ SUB_D(rd, rj, rk); \ } while (0) -- cgit 1.4.1