From eb4e8003779f378da296e06a7ad0548cad10048e Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Wed, 1 Sep 1993 18:41:28 -0400 Subject: [PATCH] (input_operand): Allow "easy" FP constants. From-SVN: r5241 --- gcc/config/rs6000/rs6000.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index bad874af52a..56cc6cdbb56 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 -- 2.30.2