diff options
| author | Yang Liu <numbksco@gmail.com> | 2024-04-02 15:24:12 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-02 09:24:12 +0200 |
| commit | 76c0992d02be79bf15ce9975cfbbc824b593d50d (patch) | |
| tree | 38d63d7609ffc0eebfd737e9fdcf125d397392ee /src/dynarec | |
| parent | e32a78a94437fbbda746bdc2beb2ae80e215f116 (diff) | |
| download | box64-76c0992d02be79bf15ce9975cfbbc824b593d50d.tar.gz box64-76c0992d02be79bf15ce9975cfbbc824b593d50d.zip | |
[LA64_DYNAREC] Fixed EBBACK (#1399)
Diffstat (limited to 'src/dynarec')
| -rw-r--r-- | src/dynarec/la64/dynarec_la64_00.c | 14 | ||||
| -rw-r--r-- | src/dynarec/la64/dynarec_la64_helper.h | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/dynarec/la64/dynarec_la64_00.c b/src/dynarec/la64/dynarec_la64_00.c index 0f506da8..e8411efd 100644 --- a/src/dynarec/la64/dynarec_la64_00.c +++ b/src/dynarec/la64/dynarec_la64_00.c @@ -60,7 +60,7 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni GETEB(x1, 0); GETGB(x2); emit_add8(dyn, ninst, x1, x2, x4, x5); - EBBACK(x5, 0); + EBBACK(); break; case 0x01: INST_NAME("ADD Ed, Gd"); @@ -78,7 +78,7 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni GETEB(x1, 0); GETGB(x2); emit_add8(dyn, ninst, x2, x1, x4, x5); - GBBACK(x5); + GBBACK(); break; case 0x03: INST_NAME("ADD Gd, Ed"); @@ -136,7 +136,7 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni GETEB(x1, 0); GETGB(x2); emit_and8(dyn, ninst, x1, x2, x4, x5); - EBBACK(x4, 0); + EBBACK(); break; case 0x21: INST_NAME("AND Ed, Gd"); @@ -154,7 +154,7 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni GETEB(x1, 0); GETGB(x2); emit_and8(dyn, ninst, x2, x1, x4, x5); - GBBACK(x5); + GBBACK(); break; case 0x23: INST_NAME("AND Gd, Ed"); @@ -185,7 +185,7 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni GETEB(x1, 0); GETGB(x2); emit_sub8(dyn, ninst, x1, x2, x4, x5, x6); - EBBACK(x5, 0); + EBBACK(); break; case 0x29: INST_NAME("SUB Ed, Gd"); @@ -203,7 +203,7 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni GETEB(x1, 0); GETGB(x2); emit_sub8(dyn, ninst, x2, x1, x4, x5, x6); - GBBACK(x5); + GBBACK(); break; case 0x2B: INST_NAME("SUB Gd, Ed"); @@ -389,7 +389,7 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni GETEB(x1, 1); u8 = F8; emit_and8c(dyn, ninst, x1, u8, x2, x4); - EBBACK(x5, 0); + EBBACK(); break; case 7: // CMP INST_NAME("CMP Eb, Ib"); diff --git a/src/dynarec/la64/dynarec_la64_helper.h b/src/dynarec/la64/dynarec_la64_helper.h index 30f341e8..74470b68 100644 --- a/src/dynarec/la64/dynarec_la64_helper.h +++ b/src/dynarec/la64/dynarec_la64_helper.h @@ -179,12 +179,12 @@ a = sse_get_reg_empty(dyn, ninst, x1, gd) // Write gb (gd) back to original register / memory, using s1 as scratch -#define GBBACK(s1) BSTRINS_D(gb1, gd, gb2 + 7, gb2); +#define GBBACK() BSTRINS_D(gb1, gd, gb2 + 7, gb2); // Write eb (ed) back to original register / memory, using s1 as scratch -#define EBBACK(s1, c) \ +#define EBBACK() \ if (wb1) { \ - SUB_D(ed, wback, fixedaddress); \ + ST_B(ed, wback, fixedaddress); \ SMWRITE(); \ } else { \ BSTRINS_D(wback, ed, wb2 + 7, wb2); \ |