aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-05-25 17:21:34 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1992-05-25 17:21:34 -0400
commitb3bf132d2c543fe8c52b31e4139435895c63142f (patch)
treee66810fc8ff1c04ed1c2fa7f5e4ef19230a13ed0
parentbc56fd1d0948edbdfb22e864e3283ac5d032545d (diff)
downloadgcc-b3bf132d2c543fe8c52b31e4139435895c63142f.zip
gcc-b3bf132d2c543fe8c52b31e4139435895c63142f.tar.gz
gcc-b3bf132d2c543fe8c52b31e4139435895c63142f.tar.bz2
*** empty log message ***
From-SVN: r1084
-rw-r--r--gcc/emit-rtl.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index ad8089b..6de0315 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -565,8 +565,9 @@ gen_lowpart_common (mode, x)
value. If the machine-parameters allow it, simulate that union here
and return the result. */
- else if (HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_INT == BITS_PER_WORD
+ else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
+ && HOST_BITS_PER_INT == BITS_PER_WORD)
+ || flag_pretend_float)
&& GET_MODE_CLASS (mode) == MODE_FLOAT
&& (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE)
&& GET_MODE (x) == VOIDmode
@@ -590,12 +591,26 @@ gen_lowpart_common (mode, x)
}
/* Similarly, if this is converting a floating-point value into a
+ single-word integer. Only do this is the host and target parameters are
+ compatible. */
+
+ else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
+ && HOST_BITS_PER_INT == BITS_PER_WORD)
+ || flag_pretend_float)
+ && GET_MODE_CLASS (mode) == MODE_INT
+ && GET_CODE (x) == CONST_DOUBLE
+ && GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT
+ && GET_MODE_BITSIZE (mode) == BITS_PER_WORD)
+ return operand_subword (x, 0, 0, GET_MODE (x));
+
+ /* Similarly, if this is converting a floating-point value into a
two-word integer, we can do this one word at a time and make an
integer. Only do this is the host and target parameters are
compatible. */
- else if (HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_INT == BITS_PER_WORD
+ else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
+ && HOST_BITS_PER_INT == BITS_PER_WORD)
+ || flag_pretend_float)
&& GET_MODE_CLASS (mode) == MODE_INT
&& GET_CODE (x) == CONST_DOUBLE
&& GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT