Skip to content

Commit 758a1a9

Browse files
authored
[LA64_DYNAREC] Small fix to geted and micro-optimization to LEA opcode (#3326)
1 parent 7f6e5fc commit 758a1a9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/dynarec/la64/dynarec_la64_00.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ uintptr_t dynarec64_00(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
14231423
} else { // mem <= reg
14241424
rex.seg = 0; // to be safe
14251425
SCRATCH_USAGE(0);
1426-
addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, NULL, 0, 0);
1426+
addr = geted(dyn, addr, ninst, nextop, &ed, gd, x1, &fixedaddress, rex, NULL, 0, 0);
14271427
if (gd != ed) {
14281428
if (rex.w && rex.is67)
14291429
ZEROUP2(gd, ed);

src/dynarec/la64/dynarec_la64_helper.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ uintptr_t geted(dynarec_la64_t* dyn, uintptr_t addr, int ninst, uint8_t nextop,
195195
if ((nextop & 7) == 4) {
196196
if (sib_reg != 4) {
197197
ALSLy(scratch, TO_NAT(sib_reg), TO_NAT(sib_reg2), sib >> 6);
198+
SCRATCH_USAGE(1);
198199
} else {
199200
scratch = TO_NAT(sib_reg2);
200201
}

0 commit comments

Comments
 (0)