diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1992-05-26 19:25:49 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1992-05-26 19:25:49 -0400 |
commit | d6020413709292de674c4d481505dbadd304895c (patch) | |
tree | 4711d6e6c65c334adf47469d8d9740c9d051463b /gcc | |
parent | c753237db26c6fe9dd4c648db2392af534b5a653 (diff) | |
download | gcc-d6020413709292de674c4d481505dbadd304895c.zip gcc-d6020413709292de674c4d481505dbadd304895c.tar.gz gcc-d6020413709292de674c4d481505dbadd304895c.tar.bz2 |
*** empty log message ***
From-SVN: r1093
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/emit-rtl.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 6de0315..95f276f 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -563,12 +563,28 @@ gen_lowpart_common (mode, x) /* If X is an integral constant but we want it in floating-point, it must be the case that we have a union of an integer and a floating-point value. If the machine-parameters allow it, simulate that union here - and return the result. */ + and return the result. The two-word and single-word cases are + different. */ 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_MODE_SIZE (mode) == UNITS_PER_WORD + && GET_CODE (x) == CONST_INT + && sizeof (float) * HOST_BITS_PER_CHAR == HOST_BITS_PER_INT) + { + union {int i; float d; } u; + + u.i = INTVAL (x); + return immed_real_const_1 (u.d, mode); + } + + 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_MODE_SIZE (mode) == 2 * UNITS_PER_WORD && (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE) && GET_MODE (x) == VOIDmode && sizeof (double) * HOST_BITS_PER_CHAR == 2 * HOST_BITS_PER_INT) |