mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
68d0ed3786
commit
47446c9ce3
3 changed files with 20 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue