mirror of
https://github.com/ptitSeb/box64.git
synced 2026-11-09 12:21:28 -10:00
Added 9E/9F opcodes ([DYNAREC] too)
This commit is contained in:
1 parent
88b6cc1907
commit
d01bdf9186
2 files changed
+28
-2
No files matched your search
@@ -1016,7 +1016,21 @@ uintptr_t dynarec64_00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
|
||||
ORRw_mask(xFlags, xFlags, 0b011111, 0); //mask=0x00000002
|
||||
SET_DFNONE(x1);
|
||||
break;
|
||||
|
||||
case 0x9E:
|
||||
INST_NAME("SAHF");
|
||||
SETFLAGS(X_CF|X_PF|X_AF|X_ZF|X_SF, SF_SUBSET);
|
||||
MOV32w(x2, 0b11010101);
|
||||
BICw_REG(xFlags, xFlags, x2);
|
||||
UBFXx(x1, xRAX, 8, 8);
|
||||
ANDw_REG(x1, x1, x2);
|
||||
ORRw_REG(xFlags, xFlags, x1);
|
||||
SET_DFNONE(x1);
|
||||
break;
|
||||
case 0x9F:
|
||||
INST_NAME("LAHF");
|
||||
READFLAGS(X_CF|X_PF|X_AF|X_ZF|X_SF);
|
||||
BFIx(xRAX, xFlags, 8, 8);
|
||||
break;
|
||||
case 0xA0:
|
||||
INST_NAME("MOV AL,Ob");
|
||||
u64 = F64;
|
||||
|
||||
+13
-1
@@ -538,7 +538,19 @@ x64emurun:
|
||||
emu->eflags.x64 = ((Pop(emu) & 0x3F7FD7)/* & (0xffff-40)*/ ) | 0x2; // mask off res2 and res3 and on res1
|
||||
RESET_FLAGS(emu);
|
||||
break;
|
||||
|
||||
case 0x9E: /* SAHF */
|
||||
tmp8u = emu->regs[_AX].byte[1];
|
||||
CONDITIONAL_SET_FLAG(tmp8u&0x01, F_CF);
|
||||
CONDITIONAL_SET_FLAG(tmp8u&0x04, F_PF);
|
||||
CONDITIONAL_SET_FLAG(tmp8u&0x10, F_AF);
|
||||
CONDITIONAL_SET_FLAG(tmp8u&0x40, F_ZF);
|
||||
CONDITIONAL_SET_FLAG(tmp8u&0x80, F_SF);
|
||||
RESET_FLAGS(emu);
|
||||
break;
|
||||
case 0x9F: /* LAHF */
|
||||
CHECK_FLAGS(emu);
|
||||
R_AH = (uint8_t)emu->eflags.x64;
|
||||
break;
|
||||
case 0xA0: /* MOV AL,Ob */
|
||||
R_AL = *(uint8_t*)F64;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user