2 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
6 #include "mathieeedoubbas_intern.h"
8 /*****************************************************************************
12 AROS_LHQUAD1(double, IEEEDPNeg
,
15 AROS_LHAQUAD(double, y
, D0
, D1
),
18 struct MathIeeeDoubBasBase
*, MathIeeeDoubBasBase
, 10, MathIeeeDoubBas
)
21 Switches the sign of the given IEEE double precision floating point
25 y - IEEE double precision floating point number.
28 x - the negation of y.
32 negative : result is negative
46 Flip the sign-bit (even for zeroes).
48 *****************************************************************************/
52 QUAD
* Qy
= (QUAD
*)&y
;
54 /* change the sign-bit */
55 XOR64QC(*Qy
, IEEEDPSign_Mask_Hi
, IEEEDPSign_Mask_Lo
);
59 is_eqC(*Qy
, 0x0, 0x0 )
60 || is_eqC(*Qy
, IEEEDPSign_Mask_Hi
, IEEEDPSign_Mask_Lo
)
63 SetSR( Zero_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
68 if(is_lessSC(*Qy
, 0x0, 0x0) )
70 /* result is negative */
71 SetSR(Negative_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
75 /* result is positive */
76 SetSR(0, Zero_Bit
| Overflow_Bit
| Negative_Bit
);