diff options
author | Laurent Vivier <laurent@vivier.eu> | 2018-03-12 21:27:21 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2018-03-13 16:34:09 +0100 |
commit | 47446c9ce34b6685ffe20e829ff6c9aaefd3af0a (patch) | |
tree | 051db46e123de533ce97a81b9d28cbfbb4442db2 /target/m68k/fpu_helper.c | |
parent | 68d0ed37866de2c5cafc4e2589e263961b2e8cd6 (diff) |
target/m68k: implement fsincos
using floatx80_sin() and floatx80_cos()
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180312202728.23790-5-laurent@vivier.eu>
Diffstat (limited to 'target/m68k/fpu_helper.c')
-rw-r--r-- | target/m68k/fpu_helper.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target/m68k/fpu_helper.c b/target/m68k/fpu_helper.c index 71df19c685..36e34d42a8 100644 --- a/target/m68k/fpu_helper.c +++ b/target/m68k/fpu_helper.c @@ -607,3 +607,14 @@ void HELPER(fcos)(CPUM68KState *env, FPReg *res, FPReg *val) { res->d = floatx80_cos(val->d, &env->fp_status); } + +void HELPER(fsincos)(CPUM68KState *env, FPReg *res0, FPReg *res1, FPReg *val) +{ + floatx80 a = val->d; + /* If res0 and res1 specify the same floating-point data register, + * the sine result is stored in the register, and the cosine + * result is discarded. + */ + res1->d = floatx80_cos(a, &env->fp_status); + res0->d = floatx80_sin(a, &env->fp_status); +} |