about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2023-11-27 04:51:27 +0800
committerGitHub <noreply@github.com>2023-11-26 21:51:27 +0100
commit6b390caef546f65ac1f4b95983227186cd93d601 (patch)
tree3b66602296aa5448aca215120d30217ea4cbfec4 /src
parent8cee527ad0e85c1bde31d2e8c2c89e305875d7f9 (diff)
downloadbox64-6b390caef546f65ac1f4b95983227186cd93d601.tar.gz
box64-6b390caef546f65ac1f4b95983227186cd93d601.zip
[DYNAREC_RV64] Fixed emit_ror32 (#1087)
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/rv64/dynarec_rv64_emit_shift.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_emit_shift.c b/src/dynarec/rv64/dynarec_rv64_emit_shift.c
index 80dea7a9..2460bd72 100644
--- a/src/dynarec/rv64/dynarec_rv64_emit_shift.c
+++ b/src/dynarec/rv64/dynarec_rv64_emit_shift.c
@@ -385,8 +385,8 @@ void emit_ror32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s
         SDxw(s1, xEmu, offsetof(x64emu_t, res));
     }
     IFX(X_CF) {
-        SRLI(s3, s1, rex.w?63:31);
-        AND(xFlags, xFlags, s3);
+        SRLIxw(s3, s1, rex.w?63:31);
+        OR(xFlags, xFlags, s3);
     }
     IFX(X_OF) {
         ADDI(s3, xZR, 1);
@@ -479,8 +479,8 @@ void emit_ror32c(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, uint32_t c,
         SDxw(s1, xEmu, offsetof(x64emu_t, res));
     }
     IFX(X_CF) {
-        SRLI(s3, s1, rex.w?63:31);
-        AND(xFlags, xFlags, s3);
+        SRLIxw(s3, s1, rex.w?63:31);
+        OR(xFlags, xFlags, s3);
     }
     IFX(X_OF) {
         if(c==1) {