8000 [RV64_DYNAREC] Added DF default /4 opcode by zohanzephyr · Pull Request #1631 · ptitSeb/box64 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[RV64_DYNAREC] Added DF default /4 opcode #1631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/dynarec/rv64/dynarec_rv64_df.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,33 @@ uintptr_t dynarec64_DF(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
SH(x4, wback, fixedaddress);
X87_POP_OR_FAIL(dyn, ninst, x3);
break;
case 4:
INST_NAME("FIST Ew, ST0");
v1 = x87_get_st(dyn, ninst, x1, x2, 0, EXT_CACHE_ST_F);
u8 = x87_setround(dyn, ninst, x1, x2);
addr = geted(dyn, addr, ninst, nextop, &wback, x2, x3, &fixedaddress, rex, NULL, 1, 0);
if(!box64_dynarec_fastround) {
FSFLAGSI(0); // reset all bits
}
if (ST_IS_F(0)) {
FCVTWS(x4, v1, RD_DYN);
} else {
FCVTWD(x4, v1, RD_DYN);
}
x87_restoreround(dyn, ninst, u8);
if(!box64_dynarec_fastround) {
FRFLAGS(x5); // get back FPSR to check the IOC bit
ANDI(x5, x5, 1<<FR_NV);
BNEZ_MARK(x5);
SLLIW(x5, x4, 16);
SRAIW(x5, x5, 16);
BEQ_MARK2(x5, x4);
MARK;
MOV32w(x4, 0x8000);
}
MARK2;
SH(x4, wback, fixedaddress);
break;
case 5:
INST_NAME("FILD ST0, i64");
X87_PUSH_OR_FAIL(v1, dyn, ninst, x1, EXT_CACHE_ST_I64);
Expand Down
0