Skip to content

Commit

Permalink
FISTTP addition needed for long double FPU code
Browse files Browse the repository at this point in the history
  • Loading branch information
joncampbell123 committed Sep 1, 2021
1 parent 2689ff9 commit aba4ea0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/fpu/fpu_instructions_longdouble.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,24 @@ static void FPU_FST_I64(PhysPt addr) {
mem_writeq(addr,(uint64_t)static_cast<int64_t>(FROUND(fpu.regs_80[TOP].v)));
}

// WARNING: UNTESTED. Original contributed code only focused on the x86 FPU case.
static void FPU_FSTT_I16(PhysPt addr) {
mem_writew(addr,(uint16_t)static_cast<int16_t>(fpu.regs_80[TOP].v));
FPU_FPOP();
}

// WARNING: UNTESTED. Original contributed code only focused on the x86 FPU case.
static void FPU_FSTT_I32(PhysPt addr) {
mem_writed(addr,(uint32_t)static_cast<int32_t>(fpu.regs_80[TOP].v));
FPU_FPOP();
}

// WARNING: UNTESTED. Original contributed code only focused on the x86 FPU case.
static void FPU_FSTT_I64(PhysPt addr) {
mem_writeq(addr,(uint64_t)static_cast<int64_t>(fpu.regs_80[TOP].v));
FPU_FPOP();
}

static void FPU_FBST(PhysPt addr) {
FPU_Reg_80 val = fpu.regs_80[TOP];
bool sign = false;
Expand Down

0 comments on commit aba4ea0

Please sign in to comment.