diff options
author | Jeff Law <law@gcc.gnu.org> | 1997-10-24 13:56:45 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-10-24 13:56:45 -0600 |
commit | bf4219f03fc679b9998abb6a302ba1ef6c947a3b (patch) | |
tree | e285a5efe7dfb6e5468cba3a74a99b6e93f7104d | |
parent | 27f654110eea44584a211a390988d538c9cac129 (diff) | |
download | gcc-bf4219f03fc679b9998abb6a302ba1ef6c947a3b.zip gcc-bf4219f03fc679b9998abb6a302ba1ef6c947a3b.tar.gz gcc-bf4219f03fc679b9998abb6a302ba1ef6c947a3b.tar.bz2 |
Another goof in last change.
From-SVN: r16165
-rw-r--r-- | gcc/config/mn10300/mn10300.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index e022063..158cb2b 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -1051,11 +1051,15 @@ legitimize_address (x, oldx, mode) if (GET_CODE (y) == CONST) y = XEXP (y, 0); - regx1 = force_reg (Pmode, force_operand (XEXP (x, 0), 0)); - regy1 = force_reg (Pmode, force_operand (XEXP (y, 0), 0)); - regy2 = force_reg (Pmode, force_operand (XEXP (y, 1), 0)); - regx1 = force_reg (Pmode, gen_rtx (GET_CODE (y), Pmode, regx1, regy2)); - return force_reg (Pmode, gen_rtx (PLUS, Pmode, regx1, regy1)); + if (GET_CODE (y) == PLUS || GET_CODE (y) == MINUS) + { + regx1 = force_reg (Pmode, force_operand (XEXP (x, 0), 0)); + regy1 = force_reg (Pmode, force_operand (XEXP (y, 0), 0)); + regy2 = force_reg (Pmode, force_operand (XEXP (y, 1), 0)); + regx1 = force_reg (Pmode, + gen_rtx (GET_CODE (y), Pmode, regx1, regy2)); + return force_reg (Pmode, gen_rtx (PLUS, Pmode, regx1, regy1)); + } } return x; } |