summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-08 12:42:09 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-08 12:42:09 +0000
commit39bda59f75df70a4818bcb4ed661047602d8004c (patch)
tree0c5e3a2cd8340e1cee6ccd95b0510cee1500d141
parent5bfbf14b0b790f93d4523015691b16f983cc5f7c (diff)
downloadgcc-39bda59f75df70a4818bcb4ed661047602d8004c.tar.gz
Commited on behalf of geoffk@cygnus.com:
* config/rs6000/rs6000.c (rs6000_emit_move): Fix conditions for emitting aux_truncdfsf2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34925 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.c13
2 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5048c23e1db..6b34b7a2ea7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-07-08 Geoffrey Keating <geoffk@cygnus.com>
+
+ * config/rs6000/rs6000.c (rs6000_emit_move): Fix conditions for
+ emitting aux_truncdfsf2.
+
2000-07-03 Donn Terry (donnte@microsoft.com)
* cppinit.c (print_help): split overlong line into ISO C89
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 73b46df7ce0..ba8562be342 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1492,10 +1492,17 @@ rs6000_emit_move (dest, source, mode)
if (! no_new_pseudos && GET_CODE (operands[0]) != REG)
operands[1] = force_reg (mode, operands[1]);
- if (mode == SFmode && ! TARGET_POWERPC && TARGET_HARD_FLOAT)
+ if (mode == SFmode && ! TARGET_POWERPC && TARGET_HARD_FLOAT
+ && GET_CODE (operands[0]) == MEM)
{
- int regnum = true_regnum (operands[1]);
- /* regnum may be -1 in which case the test below will fail. */
+ int regnum;
+
+ if (reload_in_progress || reload_completed)
+ regnum = true_regnum (operands[1]);
+ else if (GET_CODE (operands[1]) == REG)
+ regnum = REGNO (operands[1]);
+ else
+ regnum = -1;
/* If operands[1] is a register, on POWER it may have
double-precision data in it, so truncate it to single