m68k: add ftentox instruction
PATCH 89/111 m68k: add ftentox instruction
From: Laurent Vivier <[email protected]>
allow gnome-background-properties to run
Signed-off-by Laurent Vivier <[email protected]>
--- target-m68k/helper.c | 15 +++++++++++++++ target-m68k/helpers.h | 1 + target-m68k/translate.c | 3 +++ 3 files changed, 19 insertions(+), 0 deletions(-)
target-m68k/helper.c +15 -0
@@ -1411,6 +1411,21 @@ void HELPER(exp2_FP0)(CPUState *env)floatx80_to_FP0 (env,float32_to_floatx80 (res, &env->fp_status)); } +void HELPER (exp10_FP0 )(CPUState *env) +{ +floatx80 res; +long double val; + + res =FP0_to_floatx80 (env); + val =LDOUBLE (res); + +DBG_FPUH ("exp2_FP0 %Lg" , val); + val =exp10l (val); +DBG_FPU (" = %Lg" , val); + res =FLOATx80 (val); +floatx80_to_FP0 (env, res); +} +void HELPER (abs_FP0 )(CPUState *env) {floatx80 res;
target-m68k/helpers.h +1 -0
@@ -70,6 +70,7 @@ DEF_HELPER_1(sin_FP0, void, env) DEF_HELPER_1(tan_FP0, void, env) DEF_HELPER_1(exp_FP0, void, env) DEF_HELPER_1(exp2_FP0, void, env) +DEF_HELPER_1(exp10_FP0, void, env) DEF_HELPER_1(ln_FP0, void, env) DEF_HELPER_1(log10_FP0, void, env)DEF_HELPER_1 (abs_FP0, void, env)
target-m68k/translate.c +3 -0
@@ -3704,6 +3704,9 @@ DISAS_INSN(fpu)case 0x11 :/* ftwotox */ gen_helper_exp2_FP0 (cpu_env);break ; +case 0x12 :/* ftentox */ +gen_helper_exp10_FP0 (cpu_env); +break ;case 0x14 :/* flogn */ gen_helper_ln_FP0 (cpu_env);break ;
Signature · 1 line
1.7.2.3