diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2005-05-08 12:23:39 +0200 |
---|---|---|
committer | Stephane Carrez <ciceron@gcc.gnu.org> | 2005-05-08 12:23:39 +0200 |
commit | a0cd568f5935e52a2c19b21b78bea7c1296745b6 (patch) | |
tree | 540d84c136ed24826e93001fc347cedc67b248bd | |
parent | 232b67d9f8f29a786e52f4d757a68ec6b032cfc7 (diff) | |
download | gcc-a0cd568f5935e52a2c19b21b78bea7c1296745b6.zip gcc-a0cd568f5935e52a2c19b21b78bea7c1296745b6.tar.gz gcc-a0cd568f5935e52a2c19b21b78bea7c1296745b6.tar.bz2 |
re PR target/16925 (ICE when building a m68hc11 cross-compiler on 64-bit architectures)
PR target/16925
* config/m68hc11/m68hc11.c (m68hc11_gen_highpart): Handle split of
64-bit constants on 64-bit hosts.
(m68hc11_split_logical): Simplify.
(m68hc11_split_move): Likewise.
From-SVN: r99388
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/m68hc11/m68hc11.c | 36 |
2 files changed, 15 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 38b08bd..7762083 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2005-05-08 Stephane Carrez <stcarrez@nerim.fr> + + PR target/16925 + * config/m68hc11/m68hc11.c (m68hc11_gen_highpart): Handle split of + 64-bit constants on 64-bit hosts. + (m68hc11_split_logical): Simplify. + (m68hc11_split_move): Likewise. + 2005-05-08 Nathan Sidwell <nathan@codesourcery.com> Paolo Bonzini <bonzini@gnu.org> diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c index 06c7e3e..93fe2c3 100644 --- a/gcc/config/m68hc11/m68hc11.c +++ b/gcc/config/m68hc11/m68hc11.c @@ -1929,6 +1929,10 @@ m68hc11_gen_highpart (enum machine_mode mode, rtx x) { return gen_int_mode (val >> 16, HImode); } + else if (mode == SImode) + { + return gen_int_mode (val >> 32, SImode); + } } if (mode == QImode && D_REG_P (x)) return gen_rtx_REG (mode, HARD_A_REGNUM); @@ -2814,15 +2818,7 @@ m68hc11_split_move (rtx to, rtx from, rtx scratch) high_to = m68hc11_gen_highpart (mode, to); low_from = m68hc11_gen_lowpart (mode, from); - if (mode == SImode && GET_CODE (from) == CONST_INT) - { - if (INTVAL (from) >= 0) - high_from = const0_rtx; - else - high_from = constm1_rtx; - } - else - high_from = m68hc11_gen_highpart (mode, from); + high_from = m68hc11_gen_highpart (mode, from); if (offset) { @@ -3006,26 +3002,8 @@ m68hc11_split_logical (enum machine_mode mode, int code, rtx *operands) low[2] = m68hc11_gen_lowpart (mode, operands[2]); high[0] = m68hc11_gen_highpart (mode, operands[0]); - - if (mode == SImode && GET_CODE (operands[1]) == CONST_INT) - { - if (INTVAL (operands[1]) >= 0) - high[1] = const0_rtx; - else - high[1] = constm1_rtx; - } - else - high[1] = m68hc11_gen_highpart (mode, operands[1]); - - if (mode == SImode && GET_CODE (operands[2]) == CONST_INT) - { - if (INTVAL (operands[2]) >= 0) - high[2] = const0_rtx; - else - high[2] = constm1_rtx; - } - else - high[2] = m68hc11_gen_highpart (mode, operands[2]); + high[1] = m68hc11_gen_highpart (mode, operands[1]); + high[2] = m68hc11_gen_highpart (mode, operands[2]); low[3] = operands[3]; high[3] = operands[3]; |