mirror of
https://github.com/ish-app/ish.git
synced 2026-01-18 13:57:29 +00:00
Implement fabs/fchs
This commit is contained in:
parent
89ad262fd8
commit
c4837720ff
@ -93,6 +93,14 @@ void fpu_ucom(struct cpu_state *cpu, int i) {
|
||||
cpu->c0 = cpu->c2 = cpu->c3 = 1;
|
||||
}
|
||||
|
||||
void fpu_abs(struct cpu_state *cpu) {
|
||||
ST(0) = f80_abs(ST(0));
|
||||
}
|
||||
|
||||
void fpu_chs(struct cpu_state *cpu) {
|
||||
ST(0) = f80_neg(ST(0));
|
||||
}
|
||||
|
||||
void fpu_add(struct cpu_state *cpu, int srci, int dsti) {
|
||||
ST(dsti) = f80_add(ST(srci), ST(dsti));
|
||||
}
|
||||
|
||||
@ -30,6 +30,8 @@ void fpu_ldm80(struct cpu_state *cpu, float80 *f);
|
||||
|
||||
void fpu_prem(struct cpu_state *cpu);
|
||||
void fpu_ucom(struct cpu_state *cpu, int i);
|
||||
void fpu_abs(struct cpu_state *cpu);
|
||||
void fpu_chs(struct cpu_state *cpu);
|
||||
|
||||
void fpu_add(struct cpu_state *cpu, int srci, int dsti);
|
||||
void fpu_sub(struct cpu_state *cpu, int srci, int dsti);
|
||||
|
||||
@ -339,8 +339,8 @@ static inline bool gen_op(struct gen_state *state, gadget_t *gadgets, enum arg a
|
||||
#define FUCOM() hh(fpu_ucom, st_i)
|
||||
#define FUCOMI() UNDEFINED
|
||||
#define FST() hh(fpu_st, st_i)
|
||||
#define FCHS() UNDEFINED
|
||||
#define FABS() UNDEFINED
|
||||
#define FCHS() h(fpu_chs)
|
||||
#define FABS() h(fpu_abs)
|
||||
#define FLDC(what) hh(fpu_ldc, fconst_##what)
|
||||
#define FPREM() h(fpu_prem)
|
||||
#define FSTSW(dst) if (arg_##dst == arg_reg_a) g(fstsw_ax); else UNDEFINED
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user