diff options
| author | Joseph Myers <joseph@codesourcery.com> | 2014-10-09 17:05:26 +0000 |
|---|---|---|
| committer | Joseph Myers <joseph@codesourcery.com> | 2014-10-09 17:05:26 +0000 |
| commit | 5c0508a318af0a6c8be2a4cb2e3b76896218bf35 (patch) | |
| tree | bb4d0c9b22bad8ba022828c8a36dfeb69f511244 | |
| parent | a736ec370a05e4b37e6101eb3168bf8dc4c5af13 (diff) | |
| download | glibc-5c0508a318af0a6c8be2a4cb2e3b76896218bf35.tar.xz glibc-5c0508a318af0a6c8be2a4cb2e3b76896218bf35.zip | |
soft-fp: Use parentheses around macro arguments.
This patch cleans up the soft-fp code to use parentheses around macro
arguments (where possible; many macro arguments are identifiers used
with ## rather than arbitrary expressions, so cannot be put in
parentheses). (I'm not aware of any bugs caused by the lack of
parentheses, but this is generally good practice. The patch is not
exhaustive regarding internal macros where the arguments always come
directly from the mantissa of a floating-point number, although
probably those should be cleaned up in this regard as well.)
Tested for powerpc-nofpu that the installed shared libraries are
unchanged by this patch.
* soft-fp/double.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_D): Use
parentheses around macro arguments.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_DP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_DP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_DP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_DP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_DP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_DP): Likewise.
[_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_TO_INT_D): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_DP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_DP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_DP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_DP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_DP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_DP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_D): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_D): Likewise.
* soft-fp/extended.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_E):
Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_EP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_EP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_EP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_EP): Likewise.
[_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_TO_INT_E): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_EP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_EP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_EP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_EP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_E): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_E): Likewise.
* soft-fp/op-1.h (_FP_FRAC_SRST_1): Likewise.
(_FP_FRAC_SRS_1): Likewise.
(_FP_FRAC_CLZ_1): Likewise.
(_FP_MUL_MEAT_1_imm): Likewise.
(_FP_MUL_MEAT_1_wide): Likewise.
(_FP_MUL_MEAT_1_hard): Likewise.
(_FP_SQRT_MEAT_1): Likewise.
(_FP_FRAC_ASSEMBLE_1): Likewise.
(_FP_FRAC_DISASSEMBLE_1): Likewise.
* soft-fp/op-2.h (_FP_FRAC_CLZ_2): Likewise.
(__FP_CLZ_2): Likewise.
(_FP_MUL_MEAT_2_wide): Likewise.
(_FP_MUL_MEAT_2_wide_3mul): Likewise.
(_FP_MUL_MEAT_2_gmp): Likewise.
(_FP_MUL_MEAT_2_120_240_double): Likewise.
(_FP_SQRT_MEAT_2): Likewise.
(_FP_FRAC_ASSEMBLE_2): Likewise.
(_FP_FRAC_DISASSEMBLE_2): Likewise.
* soft-fp/op-4.h (_FP_FRAC_SRS_4): Likewise.
(_FP_FRAC_CLZ_4): Likewise.
(_FP_MUL_MEAT_4_wide): Likewise.
(_FP_MUL_MEAT_4_gmp): Likewise.
(_FP_SQRT_MEAT_4): Likewise.
(_FP_FRAC_ASSEMBLE_4): Likewise.
(_FP_FRAC_DISASSEMBLE_4): Likewise.
* soft-fp/op-common.h (_FP_CMP): Likewise.
(_FP_CMP_EQ): Likewise.
(_FP_CMP_UNORD): Likewise.
(_FP_TO_INT): Likewise.
(_FP_FROM_INT): Likewise.
[!__FP_CLZ] (__FP_CLZ): Likewise.
(_FP_DIV_HELP_imm): Likewise.
* soft-fp/quad.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_Q):
Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_QP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_QP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_QP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_QP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_QP): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_QP): Likewise.
[_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_TO_INT_Q): Likewise.
[_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_QP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_QP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_QP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_QP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_QP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_QP): Likewise.
[_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_Q): Likewise.
[_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_Q): Likewise.
* soft-fp/single.h (FP_UNPACK_RAW_S): Likewise.
(FP_UNPACK_RAW_SP): Likewise.
(FP_PACK_RAW_S): Likewise.
(FP_PACK_RAW_SP): Likewise.
(FP_UNPACK_S): Likewise.
(FP_UNPACK_SP): Likewise.
(FP_UNPACK_SEMIRAW_S): Likewise.
(FP_UNPACK_SEMIRAW_SP): Likewise.
(FP_PACK_S): Likewise.
(FP_PACK_SP): Likewise.
(FP_PACK_SEMIRAW_S): Likewise.
(FP_PACK_SEMIRAW_SP): Likewise.
(_FP_SQRT_MEAT_S): Likewise.
(FP_CMP_S): Likewise.
(FP_CMP_EQ_S): Likewise.
(FP_CMP_UNORD_S): Likewise.
(FP_TO_INT_S): Likewise.
(FP_FROM_INT_S): Likewise.
| -rw-r--r-- | ChangeLog | 154 | ||||
| -rw-r--r-- | soft-fp/double.h | 72 | ||||
| -rw-r--r-- | soft-fp/extended.h | 82 | ||||
| -rw-r--r-- | soft-fp/op-1.h | 52 | ||||
| -rw-r--r-- | soft-fp/op-2.h | 72 | ||||
| -rw-r--r-- | soft-fp/op-4.h | 122 | ||||
| -rw-r--r-- | soft-fp/op-common.h | 125 | ||||
| -rw-r--r-- | soft-fp/quad.h | 72 | ||||
| -rw-r--r-- | soft-fp/single.h | 36 |
9 files changed, 482 insertions, 305 deletions
@@ -1,5 +1,159 @@ 2014-10-09 Joseph Myers <joseph@codesourcery.com> + * soft-fp/double.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_D): Use + parentheses around macro arguments. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_DP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_D): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_DP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_D): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_DP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_D): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_DP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_D): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_DP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_D): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_DP): Likewise. + [_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_D): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_CMP_D): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_D): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_D): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_D): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_D): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_D): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_DP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_D): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_DP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_D): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_DP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_D): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_DP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_D): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_DP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_D): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_DP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_D): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_CMP_D): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_D): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_D): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_D): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_D): Likewise. + * soft-fp/extended.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_E): + Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_EP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_E): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_EP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_E): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_EP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_E): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_EP): Likewise. + [_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_E): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_CMP_E): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_E): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_E): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_E): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_E): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_E): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_EP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_E): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_EP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_E): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_EP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_E): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_EP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_E): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_CMP_E): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_E): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_E): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_E): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_E): Likewise. + * soft-fp/op-1.h (_FP_FRAC_SRST_1): Likewise. + (_FP_FRAC_SRS_1): Likewise. + (_FP_FRAC_CLZ_1): Likewise. + (_FP_MUL_MEAT_1_imm): Likewise. + (_FP_MUL_MEAT_1_wide): Likewise. + (_FP_MUL_MEAT_1_hard): Likewise. + (_FP_SQRT_MEAT_1): Likewise. + (_FP_FRAC_ASSEMBLE_1): Likewise. + (_FP_FRAC_DISASSEMBLE_1): Likewise. + * soft-fp/op-2.h (_FP_FRAC_CLZ_2): Likewise. + (__FP_CLZ_2): Likewise. + (_FP_MUL_MEAT_2_wide): Likewise. + (_FP_MUL_MEAT_2_wide_3mul): Likewise. + (_FP_MUL_MEAT_2_gmp): Likewise. + (_FP_MUL_MEAT_2_120_240_double): Likewise. + (_FP_SQRT_MEAT_2): Likewise. + (_FP_FRAC_ASSEMBLE_2): Likewise. + (_FP_FRAC_DISASSEMBLE_2): Likewise. + * soft-fp/op-4.h (_FP_FRAC_SRS_4): Likewise. + (_FP_FRAC_CLZ_4): Likewise. + (_FP_MUL_MEAT_4_wide): Likewise. + (_FP_MUL_MEAT_4_gmp): Likewise. + (_FP_SQRT_MEAT_4): Likewise. + (_FP_FRAC_ASSEMBLE_4): Likewise. + (_FP_FRAC_DISASSEMBLE_4): Likewise. + * soft-fp/op-common.h (_FP_CMP): Likewise. + (_FP_CMP_EQ): Likewise. + (_FP_CMP_UNORD): Likewise. + (_FP_TO_INT): Likewise. + (_FP_FROM_INT): Likewise. + [!__FP_CLZ] (__FP_CLZ): Likewise. + (_FP_DIV_HELP_imm): Likewise. + * soft-fp/quad.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_Q): + Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_QP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_Q): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_QP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_Q): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_QP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_Q): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_QP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_Q): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_QP): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_Q): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_QP): Likewise. + [_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_Q): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_CMP_Q): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_Q): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_Q): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_Q): Likewise. + [_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_Q): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_Q): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_QP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_Q): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_QP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_Q): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_QP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_Q): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_QP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_Q): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_QP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_Q): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_QP): Likewise. + [_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_Q): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_CMP_Q): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_Q): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_Q): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_Q): Likewise. + [_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_Q): Likewise. + * soft-fp/single.h (FP_UNPACK_RAW_S): Likewise. + (FP_UNPACK_RAW_SP): Likewise. + (FP_PACK_RAW_S): Likewise. + (FP_PACK_RAW_SP): Likewise. + (FP_UNPACK_S): Likewise. + (FP_UNPACK_SP): Likewise. + (FP_UNPACK_SEMIRAW_S): Likewise. + (FP_UNPACK_SEMIRAW_SP): Likewise. + (FP_PACK_S): Likewise. + (FP_PACK_SP): Likewise. + (FP_PACK_SEMIRAW_S): Likewise. + (FP_PACK_SEMIRAW_SP): Likewise. + (_FP_SQRT_MEAT_S): Likewise. + (FP_CMP_S): Likewise. + (FP_CMP_EQ_S): Likewise. + (FP_CMP_UNORD_S): Likewise. + (FP_TO_INT_S): Likewise. + (FP_FROM_INT_S): Likewise. + * soft-fp/op-common.h (_FP_TO_INT): Handle rsigned == 2. * soft-fp/soft-fp.h (FP_EX_INVALID_SNAN): New macro. diff --git a/soft-fp/double.h b/soft-fp/double.h index 1e6283e655..36a11a5452 100644 --- a/soft-fp/double.h +++ b/soft-fp/double.h @@ -90,21 +90,21 @@ union _FP_UNION_D }; # define FP_DECL_D(X) _FP_DECL (2, X) -# define FP_UNPACK_RAW_D(X, val) _FP_UNPACK_RAW_2 (D, X, val) -# define FP_UNPACK_RAW_DP(X, val) _FP_UNPACK_RAW_2_P (D, X, val) -# define FP_PACK_RAW_D(val, X) _FP_PACK_RAW_2 (D, val, X) +# define FP_UNPACK_RAW_D(X, val) _FP_UNPACK_RAW_2 (D, X, (val)) +# define FP_UNPACK_RAW_DP(X, val) _FP_UNPACK_RAW_2_P (D, X, (val)) +# define FP_PACK_RAW_D(val, X) _FP_PACK_RAW_2 (D, (val), X) # define FP_PACK_RAW_DP(val, X) \ do \ { \ if (!FP_INHIBIT_RESULTS) \ - _FP_PACK_RAW_2_P (D, val, X); \ + _FP_PACK_RAW_2_P (D, (val), X); \ } \ while (0) # define FP_UNPACK_D(X, val) \ do \ { \ - _FP_UNPACK_RAW_2 (D, X, val); \ + _FP_UNPACK_RAW_2 (D, X, (val)); \ _FP_UNPACK_CANONICAL (D, 2, X); \ } \ while (0) @@ -112,7 +112,7 @@ union _FP_UNION_D # define FP_UNPACK_DP(X, val) \ do \ { \ - _FP_UNPACK_RAW_2_P (D, X, val); \ + _FP_UNPACK_RAW_2_P (D, X, (val)); \ _FP_UNPACK_CANONICAL (D, 2, X); \ } \ while (0) @@ -120,7 +120,7 @@ union _FP_UNION_D # define FP_UNPACK_SEMIRAW_D(X, val) \ do \ { \ - _FP_UNPACK_RAW_2 (D, X, val); \ + _FP_UNPACK_RAW_2 (D, X, (val)); \ _FP_UNPACK_SEMIRAW (D, 2, X); \ } \ while (0) @@ -128,7 +128,7 @@ union _FP_UNION_D # define FP_UNPACK_SEMIRAW_DP(X, val) \ do \ { \ - _FP_UNPACK_RAW_2_P (D, X, val); \ + _FP_UNPACK_RAW_2_P (D, X, (val)); \ _FP_UNPACK_SEMIRAW (D, 2, X); \ } \ while (0) @@ -137,7 +137,7 @@ union _FP_UNION_D do \ { \ _FP_PACK_CANONICAL (D, 2, X); \ - _FP_PACK_RAW_2 (D, val, X); \ + _FP_PACK_RAW_2 (D, (val), X); \ } \ while (0) @@ -146,7 +146,7 @@ union _FP_UNION_D { \ _FP_PACK_CANONICAL (D, 2, X); \ if (!FP_INHIBIT_RESULTS) \ - _FP_PACK_RAW_2_P (D, val, X); \ + _FP_PACK_RAW_2_P (D, (val), X); \ } \ while (0) @@ -154,7 +154,7 @@ union _FP_UNION_D do \ { \ _FP_PACK_SEMIRAW (D, 2, X); \ - _FP_PACK_RAW_2 (D, val, X); \ + _FP_PACK_RAW_2 (D, (val), X); \ } \ while (0) @@ -163,7 +163,7 @@ union _FP_UNION_D { \ _FP_PACK_SEMIRAW (D, 2, X); \ if (!FP_INHIBIT_RESULTS) \ - _FP_PACK_RAW_2_P (D, val, X); \ + _FP_PACK_RAW_2_P (D, (val), X); \ } \ while (0) @@ -174,15 +174,15 @@ union _FP_UNION_D # define FP_MUL_D(R, X, Y) _FP_MUL (D, 2, R, X, Y) # define FP_DIV_D(R, X, Y) _FP_DIV (D, 2, R, X, Y) # define FP_SQRT_D(R, X) _FP_SQRT (D, 2, R, X) -# define _FP_SQRT_MEAT_D(R, S, T, X, Q) _FP_SQRT_MEAT_2 (R, S, T, X, Q) +# define _FP_SQRT_MEAT_D(R, S, T, X, Q) _FP_SQRT_MEAT_2 (R, S, T, X, (Q)) # define FP_FMA_D(R, X, Y, Z) _FP_FMA (D, 2, 4, R, X, Y, Z) -# define FP_CMP_D(r, X, Y, un, ex) _FP_CMP (D, 2, r, X, Y, un, ex) -# define FP_CMP_EQ_D(r, X, Y, ex) _FP_CMP_EQ (D, 2, r, X, Y, ex) -# define FP_CMP_UNORD_D(r, X, Y, ex) _FP_CMP_UNORD (D, 2, r, X, Y, ex) +# define FP_CMP_D(r, X, Y, un, ex) _FP_CMP (D, 2, (r), X, Y, (un), (ex)) +# define FP_CMP_EQ_D(r, X, Y, ex) _FP_CMP_EQ (D, 2, (r), X, Y, (ex)) +# define FP_CMP_UNORD_D(r, X, Y, ex) _FP_CMP_UNORD (D, 2, (r), X, Y, (ex)) -# define FP_TO_INT_D(r, X, rsz, rsg) _FP_TO_INT (D, 2, r, X, rsz, rsg) -# define FP_FROM_INT_D(X, r, rs, rt) _FP_FROM_INT (D, 2, X, r, rs, rt) +# define FP_TO_INT_D(r, X, rsz, rsg) _FP_TO_INT (D, 2, (r), X, (rsz), (rsg)) +# define FP_FROM_INT_D(X, r, rs, rt) _FP_FROM_INT (D, 2, X, (r), (rs), rt) # define _FP_FRAC_HIGH_D(X) _FP_FRAC_HIGH_2 (X) # define _FP_FRAC_HIGH_RAW_D(X) _FP_FRAC_HIGH_2 (X) @@ -209,21 +209,21 @@ union _FP_UNION_D }; # define FP_DECL_D(X) _FP_DECL (1, X) -# define FP_UNPACK_RAW_D(X, val) _FP_UNPACK_RAW_1 (D, X, val) -# define FP_UNPACK_RAW_DP(X, val) _FP_UNPACK_RAW_1_P (D, X, val) -# define FP_PACK_RAW_D(val, X) _FP_PACK_RAW_1 (D, val, X) +# define FP_UNPACK_RAW_D(X, val) _FP_UNPACK_RAW_1 (D, X, (val)) +# define FP_UNPACK_RAW_DP(X, val) _FP_UNPACK_RAW_1_P (D, X, (val)) +# define FP_PACK_RAW_D(val, X) _FP_PACK_RAW_1 (D, (val), X) # define FP_PACK_RAW_DP(val, X) \ do \ { \ if (!FP_INHIBIT_RESULTS) \ - _FP_PACK_RAW_1_P (D, val, X); \ + _FP_PACK_RAW_1_P (D, (val), X); \ } \ while (0) # define FP_UNPACK_D(X, val) \ do \ { \ - _FP_UNPACK_RAW_1 (D, X, val); \ + _FP_UNPACK_RAW_1 (D, X, (val)); \ _FP_UNPACK_CANONICAL (D, 1, X); \ } \ while (0) @@ -231,7 +231,7 @@ union _FP_UNION_D # define FP_UNPACK_DP(X, val) \ do \ { \ - _FP_UNPACK_RAW_1_P (D, X, val); \ + _FP_UNPACK_RAW_1_P (D, X, (val)); \ _FP_UNPACK_CANONICAL (D, 1, X); \ } \ while (0) @@ -239,7 +239,7 @@ union _FP_UNION_D # define FP_UNPACK_SEMIRAW_D(X, val) \ do \ { \ - _FP_UNPACK_RAW_1 (D, X, val); \ + _FP_UNPACK_RAW_1 (D, X, (val)); \ _FP_UNPACK_SEMIRAW (D, 1, X); \ } \ while (0) @@ -247,7 +247,7 @@ union _FP_UNION_D # define FP_UNPACK_SEMIRAW_DP(X, val) \ do \ { \ - _FP_UNPACK_RAW_1_P (D, X, val); \ + _FP_UNPACK_RAW_1_P (D, X, (val)); \ _FP_UNPACK_SEMIRAW (D, 1, X); \ } \ while (0) @@ -256,7 +256,7 @@ union _FP_UNION_D do \ { \ _FP_PACK_CANONICAL (D, 1, X); \ - _FP_PACK_RAW_1 (D, val, X); \ + _FP_PACK_RAW_1 (D, (val), X); \ } \ while (0) @@ -265,7 +265,7 @@ union _FP_UNION_D { \ _FP_PACK_CANONICAL (D, 1, X); \ if (!FP_INHIBIT_RESULTS) \ - _FP_PACK_RAW_1_P (D, val, X); \ + _FP_PACK_RAW_1_P (D, (val), X); \ } \ while (0) @@ -273,7 +273,7 @@ union _FP_UNION_D do \ { \ _FP_PACK_SEMIRAW (D, 1, X); \ - _FP_PACK_RAW_1 (D, val, X); \ + _FP_PACK_RAW_1 (D, (val), X); \ } \ while (0) @@ -282,7 +282,7 @@ union _FP_UNION_D { \ _FP_PACK_SEMIRAW (D, 1, X); \ if (!FP_INHIBIT_RESULTS) \ - _FP_PACK_RAW_1_P (D, val, X); \ + _FP_PACK_RAW_1_P (D, (val), X); \ } \ while (0) @@ -293,18 +293,18 @@ union _FP_UNION_D # define FP_MUL_D(R, X, Y) _FP_MUL (D, 1, R, X, Y) # define FP_DIV_D(R, X, Y) _FP_DIV (D, 1, R, X, Y) # define FP_SQRT_D(R, X) _FP_SQRT (D, 1, R, X) -# define _FP_SQRT_MEAT_D(R, S, T, X, Q) _FP_SQRT_MEAT_1 (R, S, T, X, Q) +# define _FP_SQRT_MEAT_D(R, S, T, X, Q) _FP_SQRT_MEAT_1 (R, S, T, X, (Q)) # define FP_FMA_D(R, X, Y, Z) _FP_FMA (D, 1, 2, R, X, Y, Z) /* The implementation of _FP_MUL_D and _FP_DIV_D should be chosen by the target machine. */ -# define FP_CMP_D(r, X, Y, un, ex) _FP_CMP (D, 1, r, X, Y, un, ex) -# define FP_CMP_EQ_D(r, X, Y, ex) _FP_CMP_EQ (D, 1, r, X, Y, ex) -# define FP_CMP_UNORD_D(r, X, Y, ex) _FP_CMP_UNORD (D, 1, r, X, Y, ex) +# define FP_CMP_D(r, X, Y, un, ex) _FP_CMP (D, 1, (r), X, Y, (un), (ex)) +# define FP_CMP_EQ_D(r, X, Y, ex) _FP_CMP_EQ (D, 1, (r), X, Y, (ex)) +# define FP_CMP_UNORD_D(r, X, Y, ex) _FP_CMP_UNORD (D, 1, (r), X, Y, (ex)) -# define FP_TO_INT_D(r, X, rsz, rsg) _FP_TO_INT (D, 1, r, X, rsz, rsg) -# define FP_FROM_INT_D(X, r, rs, rt) _FP_FROM_INT (D, 1, X, r, rs, rt) +# define FP_TO_INT_D(r, X, rsz, rsg) _FP_TO_INT (D, 1, (r), X, (rsz), (rsg)) +# define FP_FROM_INT_D(X, r, rs, rt) _FP_FROM_INT (D, 1, X, (r), (rs), rt) # define _FP_FRAC_HIGH_D(X) _FP_FRAC_HIGH_1 (X) # define _FP_FRAC_HIGH_RAW_D(X) _FP_FRAC_HIGH_1 (X) diff --git a/soft-fp/extended.h b/soft-fp/extended.h index 0dd6a87083..d16fa66174 100644 --- a/soft-fp/extended.h +++ b/soft-fp/extended.h @@ -162,7 +162,7 @@ union _FP_UNION_E # define FP_UNPACK_E(X, val) \ do \ { \ - FP_UNPACK_RAW_E (X, val); \ + FP_UNPACK_RAW_E (X, (val)); \ _FP_UNPACK_CANONICAL (E, 4, X); \ } \ while (0) @@ -170,7 +170,7 @@ union _FP_UNION_E # define FP_UNPACK_EP(X, val) \ do \ { \ - FP_UNPACK_RAW_EP (X, val); \ + FP_UNPACK_RAW_EP (X, (val)); \ _FP_UNPACK_CANONICAL (E, 4, X); \ } \ while (0) @@ -178,7 +178,7 @@ union _FP_UNION_E # define FP_UNPACK_SEMIRAW_E(X, val) \ do \ { \ - FP_UNPACK_RAW_E (X, val); \ + FP_UNPACK_RAW_E (X, (val)); \ _FP_UNPACK_SEMIRAW (E, 4, X); \ } \ while (0) @@ -186,7 +186,7 @@ union _FP_UNION_E # define FP_UNPACK_SEMIRAW_EP(X, val) \ do \ { \ - FP_UNPACK_RAW_EP (X, val); \ + FP_UNPACK_RAW_EP (X, (val)); \ _FP_UNPACK_SEMIRAW (E, 4, X); \ } \ while (0) @@ -195,7 +195,7 @@ union _FP_UNION_E do \ { \ _FP_PACK_CANONICAL (E, 4, X); \ - FP_PACK_RAW_E (val, X); \ + FP_PACK_RAW_E ((val), X); \ } \ while (0) @@ -203,7 +203,7 @@ union _FP_UNION_E do \ { \ _FP_PACK_CANONICAL (E, 4, X); \ - FP_PACK_RAW_EP (val, X); \ + FP_PACK_RAW_EP ((val), X); \ } \ while (0) @@ -211,7 +211,7 @@ union _FP_UNION_E do \ { \ _FP_PACK_SEMIRAW (E, 4, X); \ - FP_PACK_RAW_E (val, X); \ + FP_PACK_RAW_E ((val), X); \ } \ while (0) @@ -219,7 +219,7 @@ union _FP_UNION_E do \ { \ _FP_PACK_SEMIRAW (E, 4, X); \ - FP_PACK_RAW_EP (val, X); \ + FP_PACK_RAW_EP ((val), X); \ } \ while (0) @@ -244,36 +244,36 @@ union _FP_UNION_E # define _FP_SQRT_MEAT_E(R, S, T, X, q) \ do \ { \ - q = (_FP_W_TYPE) 1 << (_FP_W_TYPE_SIZE - 1); \ + (q) = (_FP_W_TYPE) 1 << (_FP_W_TYPE_SIZE - 1); \ _FP_FRAC_SRL_4 (X, (_FP_WORKBITS)); \ |
