diff options
author | Stephane Carrez <Stephane.Carrez@worldnet.fr> | 2001-07-20 21:34:56 +0200 |
---|---|---|
committer | Stephane Carrez <ciceron@gcc.gnu.org> | 2001-07-20 21:34:56 +0200 |
commit | d74e9142ac9b840a314530dc25d91df22f9170db (patch) | |
tree | f52f23103a59fe5ffa86f08fbf437df11791dabe | |
parent | 1c432a87d9bff9e86ef664d3c9f87189ec035d72 (diff) | |
download | gcc-d74e9142ac9b840a314530dc25d91df22f9170db.zip gcc-d74e9142ac9b840a314530dc25d91df22f9170db.tar.gz gcc-d74e9142ac9b840a314530dc25d91df22f9170db.tar.bz2 |
m68hc11.c (m68hc11_gen_highpart): Don't use gen_highpart.
* config/m68hc11/m68hc11.c (m68hc11_gen_highpart): Don't use
gen_highpart.
From-SVN: r44206
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/m68hc11/m68hc11.c | 26 |
2 files changed, 24 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f7af8bd..f19c5f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-07-20 Stephane Carrez <Stephane.Carrez@worldnet.fr> + + * config/m68hc11/m68hc11.c (m68hc11_gen_highpart): Don't use + gen_highpart. + 2001-07-20 Daniel Berlin <dan@cgsoftware.com> * params.def: Change default max inline insns to 100. diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c index cf5d968..da7f490 100644 --- a/gcc/config/m68hc11/m68hc11.c +++ b/gcc/config/m68hc11/m68hc11.c @@ -1922,18 +1922,30 @@ m68hc11_gen_highpart (mode, x) } /* gen_highpart crashes when it is called with a SUBREG. */ - if (GET_CODE (x) == SUBREG && SUBREG_BYTE (x) != 0) + if (GET_CODE (x) == SUBREG) { return gen_rtx (SUBREG, mode, XEXP (x, 0), XEXP (x, 1)); } - x = gen_highpart (mode, x); + if (GET_CODE (x) == REG) + { + if (REGNO (x) < FIRST_PSEUDO_REGISTER) + return gen_rtx (REG, mode, REGNO (x)); + else + return gen_rtx_SUBREG (mode, x, 0); + } - /* Return a different rtx to avoid to share it in several insns - (when used by a split pattern). Sharing addresses within - a MEM breaks the Z register replacement (and reloading). */ if (GET_CODE (x) == MEM) - x = copy_rtx (x); - return x; + { + x = change_address (x, mode, 0); + + /* Return a different rtx to avoid to share it in several insns + (when used by a split pattern). Sharing addresses within + a MEM breaks the Z register replacement (and reloading). */ + if (GET_CODE (x) == MEM) + x = copy_rtx (x); + return x; + } + abort (); } |