diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2025-08-15 06:16:34 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-15 00:16:34 +0200 |
| commit | 3815c28bfed9065efc8f663bf9623c28559f928b (patch) | |
| tree | 6fe14349f834b48986a67eb9da97429bc334d801 | |
| parent | 5144a2e2864b55ba4b3b49844fe400795b5039dd (diff) | |
| download | box64-3815c28bfed9065efc8f663bf9623c28559f928b.tar.gz box64-3815c28bfed9065efc8f663bf9623c28559f928b.zip | |
[DYNAREC] Fixed reading emu->df (#2936)
| -rw-r--r-- | src/dynarec/la64/dynarec_la64_helper.c | 2 | ||||
| -rw-r--r-- | src/dynarec/la64/dynarec_la64_helper.h | 24 | ||||
| -rw-r--r-- | src/dynarec/rv64/dynarec_rv64_helper.c | 2 | ||||
| -rw-r--r-- | src/dynarec/rv64/dynarec_rv64_helper.h | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/src/dynarec/la64/dynarec_la64_helper.c b/src/dynarec/la64/dynarec_la64_helper.c index 9357e5c7..dea9799d 100644 --- a/src/dynarec/la64/dynarec_la64_helper.c +++ b/src/dynarec/la64/dynarec_la64_helper.c @@ -1685,7 +1685,7 @@ static void flagsCacheTransform(dynarec_la64_t* dyn, int ninst, int s1) } if (go) { if (dyn->f.pending != SF_PENDING) { - LD_W(s1, xEmu, offsetof(x64emu_t, df)); + LD_WU(s1, xEmu, offsetof(x64emu_t, df)); j64 = (GETMARKF2) - (dyn->native_size); BEQZ(s1, j64); } diff --git a/src/dynarec/la64/dynarec_la64_helper.h b/src/dynarec/la64/dynarec_la64_helper.h index 0121004c..ba375b7f 100644 --- a/src/dynarec/la64/dynarec_la64_helper.h +++ b/src/dynarec/la64/dynarec_la64_helper.h @@ -950,18 +950,18 @@ #endif #ifndef READFLAGS -#define READFLAGS(A) \ - if (((A) != X_PEND && dyn->f.pending != SF_SET) \ - && (dyn->f.pending != SF_SET_PENDING)) { \ - if (dyn->f.pending != SF_PENDING) { \ - LD_D(x3, xEmu, offsetof(x64emu_t, df)); \ - j64 = (GETMARKF) - (dyn->native_size); \ - BEQ(x3, xZR, j64); \ - } \ - CALL_(const_updateflags, -1, 0); \ - MARKF; \ - dyn->f.pending = SF_SET; \ - SET_DFOK(); \ +#define READFLAGS(A) \ + if (((A) != X_PEND && dyn->f.pending != SF_SET) \ + && (dyn->f.pending != SF_SET_PENDING)) { \ + if (dyn->f.pending != SF_PENDING) { \ + LD_WU(x3, xEmu, offsetof(x64emu_t, df)); \ + j64 = (GETMARKF) - (dyn->native_size); \ + BEQ(x3, xZR, j64); \ + } \ + CALL_(const_updateflags, -1, 0); \ + MARKF; \ + dyn->f.pending = SF_SET; \ + SET_DFOK(); \ } #endif diff --git a/src/dynarec/rv64/dynarec_rv64_helper.c b/src/dynarec/rv64/dynarec_rv64_helper.c index 17f02a17..0f91036a 100644 --- a/src/dynarec/rv64/dynarec_rv64_helper.c +++ b/src/dynarec/rv64/dynarec_rv64_helper.c @@ -2701,7 +2701,7 @@ static void flagsCacheTransform(dynarec_rv64_t* dyn, int ninst, int s1) } if (go) { if (dyn->f.pending != SF_PENDING) { - LW(s1, xEmu, offsetof(x64emu_t, df)); + LWU(s1, xEmu, offsetof(x64emu_t, df)); j64 = (GETMARKF2) - (dyn->native_size); BEQZ(s1, j64); } diff --git a/src/dynarec/rv64/dynarec_rv64_helper.h b/src/dynarec/rv64/dynarec_rv64_helper.h index e665d420..4142e07a 100644 --- a/src/dynarec/rv64/dynarec_rv64_helper.h +++ b/src/dynarec/rv64/dynarec_rv64_helper.h @@ -1041,7 +1041,7 @@ if (((A) != X_PEND && dyn->f.pending != SF_SET) \ && (dyn->f.pending != SF_SET_PENDING)) { \ if (dyn->f.pending != SF_PENDING) { \ - LD(x3, xEmu, offsetof(x64emu_t, df)); \ + LWU(x3, xEmu, offsetof(x64emu_t, df)); \ j64 = (GETMARKF) - (dyn->native_size); \ BEQ(x3, xZR, j64); \ } \ |