diff options
author | Janis Johnson <janis187@us.ibm.com> | 2007-09-11 00:25:18 +0000 |
---|---|---|
committer | Janis Johnson <janis@gcc.gnu.org> | 2007-09-11 00:25:18 +0000 |
commit | fb27b3f6ef2fe946ef98a74bbfb83eac9819df1c (patch) | |
tree | cdd1d11749442787aa9127594fdf8d20fdef40b2 /gcc/config/dfp-bit.h | |
parent | 4a14361781d73eec1e76ac6102536e9854c9d9e9 (diff) | |
download | gcc-fb27b3f6ef2fe946ef98a74bbfb83eac9819df1c.zip gcc-fb27b3f6ef2fe946ef98a74bbfb83eac9819df1c.tar.gz gcc-fb27b3f6ef2fe946ef98a74bbfb83eac9819df1c.tar.bz2 |
dfp-bit.c (dfp_unary_func): Delete.
* config/dfp-bit.c (dfp_unary_func): Delete.
(dfp_unary_op): Delete.
(dfp_binary_op): Use decFloat functions instead of decNumber
functions for binary operations.
(d32_binary_op): Convert 32-bit operands to 64 bits for evaluation.
(dnn_binary_op): Call dfp_binary_op with decFloat rather than
DFP_C_TYPE.
(dfp_compare_op): Use decFloat functions insteadof decNumber
functions for comparisons.
(d32_compare_op): Convert 32-bit operands to 64 bits for evaluation.
(dnn_binary_op): Call dfp_compare_op with decFloat rather than
DFP_C_TYPE.
(DFP_ADD, DFP_SUB, DFP_MULTIPLE, DFP_DIVIDE): Use macros for
call to dxx_binary_op and decFloat function.
(DFP_EQ, DFP_NE, DFP_LT, DFP_GT, DFP_LE, DFP_GE): Use macros for
calls to dxx_binary_op and decFloat function.
* config/dfp-bit.h: Include decFloat header files.
(decFloat, DFP_BINARY_OP, DFP_COMPARE_OP, DEC_FLOAT_ADD,
DEC_FLOAT_SUBTRACT, DEC_FLOAT_MULTIPLY, DEC_FLOAT_DIVIDE,
DEC_FLOAT_COMPARE, DEC_FLOAT_IS_ZERO, DEC_FLOAT_IS_NAN,
DEC_FLOAT_IS_SIGNED: Define for each of 3 operand widths.
From-SVN: r128358
Diffstat (limited to 'gcc/config/dfp-bit.h')
-rw-r--r-- | gcc/config/dfp-bit.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gcc/config/dfp-bit.h b/gcc/config/dfp-bit.h index dfbf4f4..7c47387 100644 --- a/gcc/config/dfp-bit.h +++ b/gcc/config/dfp-bit.h @@ -277,12 +277,15 @@ extern float strtof (const char *, char **); #if WIDTH == 128 || WIDTH_TO == 128 #include "decimal128.h" +#include "decQuad.h" #endif #if WIDTH == 64 || WIDTH_TO == 64 #include "decimal64.h" +#include "decDouble.h" #endif #if WIDTH == 32 || WIDTH_TO == 32 #include "decimal32.h" +#include "decSingle.h" #endif #include "decNumber.h" @@ -332,6 +335,46 @@ extern float strtof (const char *, char **); #define DFP_UNORD DPD_BID_NAME(__dpd_unordtd2,__bid_unordtd2) #endif +/* Names of decNumber functions for DPD arithmetic. */ + +#if WIDTH == 32 +#define decFloat decDouble +#define DFP_BINARY_OP d32_binary_op +#define DFP_COMPARE_OP d32_compare_op +#define DEC_FLOAT_ADD decDoubleAdd +#define DEC_FLOAT_SUBTRACT decDoubleSubtract +#define DEC_FLOAT_MULTIPLY decDoubleMultiply +#define DEC_FLOAT_DIVIDE decDoubleDivide +#define DEC_FLOAT_COMPARE decDoubleCompare +#define DEC_FLOAT_IS_ZERO decDoubleIsZero +#define DEC_FLOAT_IS_NAN decDoubleIsNaN +#define DEC_FLOAT_IS_SIGNED decDoubleIsSigned +#elif WIDTH == 64 +#define DFP_BINARY_OP dnn_binary_op +#define DFP_COMPARE_OP dnn_compare_op +#define decFloat decDouble +#define DEC_FLOAT_ADD decDoubleAdd +#define DEC_FLOAT_SUBTRACT decDoubleSubtract +#define DEC_FLOAT_MULTIPLY decDoubleMultiply +#define DEC_FLOAT_DIVIDE decDoubleDivide +#define DEC_FLOAT_COMPARE decDoubleCompare +#define DEC_FLOAT_IS_ZERO decDoubleIsZero +#define DEC_FLOAT_IS_NAN decDoubleIsNaN +#define DEC_FLOAT_IS_SIGNED decDoubleIsSigned +#elif WIDTH == 128 +#define DFP_BINARY_OP dnn_binary_op +#define DFP_COMPARE_OP dnn_compare_op +#define decFloat decQuad +#define DEC_FLOAT_ADD decQuadAdd +#define DEC_FLOAT_SUBTRACT decQuadSubtract +#define DEC_FLOAT_MULTIPLY decQuadMultiply +#define DEC_FLOAT_DIVIDE decQuadDivide +#define DEC_FLOAT_COMPARE decQuadCompare +#define DEC_FLOAT_IS_ZERO decQuadIsZero +#define DEC_FLOAT_IS_NAN decQuadIsNaN +#define DEC_FLOAT_IS_SIGNED decQuadIsSigned +#endif + /* Names of functions to convert between different decimal float types. */ #if WIDTH == 32 |