Correct the floatx80_abs() and floatx80_chs() declarations when used with C++ code - fixes the sign in some trigonometric instruction, fixes Quake on SoftFloat.
This commit is contained in:
@@ -80,7 +80,11 @@ int floatx80_compare_quiet(floatx80 a, floatx80 b, struct float_status_t *status
|
||||
| for Binary Floating-Point Arithmetic.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
BX_CPP_INLINE floatx80& floatx80_abs(floatx80 ®)
|
||||
#else
|
||||
BX_CPP_INLINE floatx80 floatx80_abs(floatx80 reg)
|
||||
#endif
|
||||
{
|
||||
reg.exp &= 0x7FFF;
|
||||
return reg;
|
||||
@@ -92,7 +96,11 @@ BX_CPP_INLINE floatx80 floatx80_abs(floatx80 reg)
|
||||
| Floating-Point Arithmetic.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
BX_CPP_INLINE floatx80& floatx80_chs(floatx80 ®)
|
||||
#else
|
||||
BX_CPP_INLINE floatx80 floatx80_chs(floatx80 reg)
|
||||
#endif
|
||||
{
|
||||
reg.exp ^= 0x8000;
|
||||
return reg;
|
||||
|
Reference in New Issue
Block a user