summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/rs6000.c
diff options
context:
space:
mode:
authormeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-07-10 22:04:32 +0000
committermeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-07-10 22:04:32 +0000
commit0a59c6eb605e5db5f1a0d479aca254c2d5aa220c (patch)
tree38afd7e4f5a093d4bcbe87f1c558b7556b6f560e /gcc/config/rs6000/rs6000.c
parent061d2966aa33a8195bf34562a431d5bbf76c52dd (diff)
downloadgcc-0a59c6eb605e5db5f1a0d479aca254c2d5aa220c.tar.gz
Fix last change
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12422 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/rs6000.c')
-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 7b7896001b4..921bc18664e 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -632,12 +632,19 @@ num_insns_constant (op, mode)
rtx op;
enum machine_mode mode;
{
- if (mode != SImode && mode != DImode && mode != SFmode && mode != DFmode)
- abort ();
-
if (GET_CODE (op) == CONST_INT)
return num_insns_constant_wide (INTVAL (op));
+ else if (GET_CODE (op) == CONST_DOUBLE && mode == SFmode)
+ {
+ long l;
+ REAL_VALUE_TYPE rv;
+
+ REAL_VALUE_FROM_CONST_DOUBLE (rv, op);
+ REAL_VALUE_TO_TARGET_SINGLE (rv, l);
+ return num_insns_constant_wide ((HOST_WIDE_INT)l);
+ }
+
else if (GET_CODE (op) == CONST_DOUBLE && TARGET_32BIT)
return (num_insns_constant_wide (CONST_DOUBLE_LOW (op))
+ num_insns_constant_wide (CONST_DOUBLE_HIGH (op)));