2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "mathieeedoubbas_intern.h"
10 Switch the sign of the given IEEE double precision floating point
18 negative : result is negative
32 Flip the sign-bit (even for zeroes).
37 AROS_LHQUAD1(double, IEEEDPNeg
,
38 AROS_LHAQUAD(double, y
, D0
, D1
),
39 struct MathIeeeDoubBasBase
*, MathIeeeDoubBasBase
, 10, MathIeeeDoubBas
44 QUAD
* Qy
= (QUAD
*)&y
;
46 /* change the sign-bit */
47 XOR64QC(*Qy
, IEEEDPSign_Mask_Hi
, IEEEDPSign_Mask_Lo
);
51 is_eqC(*Qy
, 0x0, 0x0 )
52 || is_eqC(*Qy
, IEEEDPSign_Mask_Hi
, IEEEDPSign_Mask_Lo
)
55 SetSR( Zero_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
60 if(is_lessSC(*Qy
, 0x0, 0x0) )
62 /* result is negative */
63 SetSR(Negative_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
67 /* result is positive */
68 SetSR(0, Zero_Bit
| Overflow_Bit
| Negative_Bit
);