aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-09-01 18:41:28 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-09-01 18:41:28 -0400
commiteb4e8003779f378da296e06a7ad0548cad10048e (patch)
tree5de247fc4cc2a44a1bd8dd0270b4739b02f1c5d2
parent87935f601efe35aa8fbefbd4cb53c92864148b14 (diff)
downloadgcc-eb4e8003779f378da296e06a7ad0548cad10048e.zip
gcc-eb4e8003779f378da296e06a7ad0548cad10048e.tar.gz
gcc-eb4e8003779f378da296e06a7ad0548cad10048e.tar.bz2
(input_operand): Allow "easy" FP constants.
From-SVN: r5241
-rw-r--r--gcc/config/rs6000/rs6000.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index bad874a..56cc6cd 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -405,14 +405,21 @@ input_operand (op, mode)
register rtx op;
enum machine_mode mode;
{
+ /* Memory is always valid. */
if (memory_operand (op, mode))
return 1;
- /* For floating-point or multi-word mode, only register or memory
- is valid. */
+ /* For floating-point, easy constants are valid. */
+ if (GET_MODE_CLASS (mode) == MODE_FLOAT
+ && CONSTANT_P (op)
+ && easy_fp_constant (op, mode))
+ return 1;
+
+ /* For floating-point or multi-word mode, the only remaining valid type
+ is a register. */
if (GET_MODE_CLASS (mode) == MODE_FLOAT
|| GET_MODE_SIZE (mode) > UNITS_PER_WORD)
- return gpc_reg_operand (op, mode);
+ return register_operand (op, mode);
/* The only cases left are integral modes one word or smaller (we
do not get called for MODE_CC values). These can be in any