Skip to content

Commit

Permalink
Implement fiadd
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Apr 6, 2018
1 parent 20dac20 commit da9f150
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion emu/decode.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ __no_instrument int CONCAT(decoder_name, OP_SIZE)(struct cpu_state *cpu, struct
READMODRM; MOV(modrm_reg, modrm_val,128); break;

case 0x31: TRACEI("rdtsc");
// TODO there's a clang builtin for this
RDTSC; break;

case 0x40: TRACEI("cmovo modrm, reg");
Expand Down Expand Up @@ -548,6 +547,7 @@ __no_instrument int CONCAT(decoder_name, OP_SIZE)(struct cpu_state *cpu, struct
case 0xd90: TRACE("fld mem32"); FLDM(mem_addr_real,32); break;
case 0xd95: TRACE("fldcw mem16"); FLDCW(mem_addr); break;
case 0xd97: TRACE("fnstcw mem16"); FSTCW(mem_addr); break;
case 0xda0: TRACE("fiadd mem32"); FIADD(mem_addr,32); break;
case 0xda1: TRACE("fimul mem32"); FIMUL(mem_addr,32); break;
case 0xda4: TRACE("fisub mem32"); FISUB(mem_addr,32); break;
case 0xda6: TRACE("fidiv mem32"); FIDIV(mem_addr,32); break;
Expand Down
2 changes: 2 additions & 0 deletions emu/interp/fpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ static inline extFloat80_t extF80_abs(extFloat80_t f) {

#define FADD(src, dst) \
dst = extF80_add(dst, src)
#define FIADD(val,z) \
ST(0) = extF80_add(ST(0), i64_to_extF80((sint(z)) get(val,z)))
#define FADDM(val,z) \
ST(0) = extF80_add(ST(0), f_to_extF80(get(val,z),z))
#define FSUB(src, dst) \
Expand Down

0 comments on commit da9f150

Please sign in to comment.