aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2002-03-12 14:32:37 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2002-03-12 14:32:37 +0000
commit6a4e49c11d37b842954ce3edd38fded25e2411b2 (patch)
tree8e297331611a3bf8ee53a92f81d9893091a14112 /gcc
parentacf8bc2567983c3faf2a5ecc6153b02ce89f57f5 (diff)
downloadgcc-6a4e49c11d37b842954ce3edd38fded25e2411b2.zip
gcc-6a4e49c11d37b842954ce3edd38fded25e2411b2.tar.gz
gcc-6a4e49c11d37b842954ce3edd38fded25e2411b2.tar.bz2
s390.md (reload_insi, [...]): Change mode of scratch register to DImode / TImode.
* config/s390/s390.md (reload_insi, reload_indi): Change mode of scratch register to DImode / TImode. config/s390/s390.c (s390_expand_plus_operand): Make sure scratch register used does not overlap the target. From-SVN: r50652
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/s390/s390.c19
-rw-r--r--gcc/config/s390/s390.md6
3 files changed, 24 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 583285c..6bbc35f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2002-03-12 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/s390/s390.md (reload_insi, reload_indi): Change mode of
+ scratch register to DImode / TImode.
+ config/s390/s390.c (s390_expand_plus_operand): Make sure scratch
+ register used does not overlap the target.
+
2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (debug.o): Depend on debug.h.
@@ -76,8 +83,6 @@
* alias.c (record_component_aliases): Record aliases for base
classes too.
-2002-03-11 Ulrich Weigand <uweigand@de.ibm.com>
-
* config/s390/s390.h (REG_ALLOC_ORDER): Add missing register.
2002-03-11 Douglas B Rupp <rupp@gnat.com>
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index f4696e4..2881aab 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -1,5 +1,5 @@
/* Subroutines used for code generation on IBM S/390 and zSeries
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Hartmut Penner (hpenner@de.ibm.com) and
Ulrich Weigand (uweigand@de.ibm.com).
@@ -1169,14 +1169,23 @@ s390_plus_operand (op, mode)
SCRATCH may be used as scratch register. */
void
-s390_expand_plus_operand (target, src, scratch)
+s390_expand_plus_operand (target, src, scratch_in)
register rtx target;
register rtx src;
- register rtx scratch;
+ register rtx scratch_in;
{
- /* src must be a PLUS; get its two operands. */
- rtx sum1, sum2;
+ rtx sum1, sum2, scratch;
+
+ /* ??? reload apparently does not ensure that the scratch register
+ and the target do not overlap. We absolutely require this to be
+ the case, however. Therefore the reload_in[sd]i patterns ask for
+ a double-sized scratch register, and if one part happens to be
+ equal to the target, we use the other one. */
+ scratch = gen_rtx_REG (Pmode, REGNO (scratch_in));
+ if (rtx_equal_p (scratch, target))
+ scratch = gen_rtx_REG (Pmode, REGNO (scratch_in) + 1);
+ /* src must be a PLUS; get its two operands. */
if (GET_CODE (src) != PLUS || GET_MODE (src) != Pmode)
abort ();
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index 1ec96849..f4fbfc0 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -1,5 +1,5 @@
;;- Machine description for GNU compiler -- S/390 / zSeries version.
-;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
;; Contributed by Hartmut Penner (hpenner@de.ibm.com) and
;; Ulrich Weigand (uweigand@de.ibm.com).
;; This file is part of GNU CC.
@@ -3151,7 +3151,7 @@
(define_expand "reload_indi"
[(parallel [(match_operand:DI 0 "register_operand" "=a")
(match_operand:DI 1 "s390_plus_operand" "")
- (match_operand:DI 2 "register_operand" "=&a")])]
+ (match_operand:TI 2 "register_operand" "=&a")])]
"TARGET_64BIT"
"
{
@@ -3238,7 +3238,7 @@
(define_expand "reload_insi"
[(parallel [(match_operand:SI 0 "register_operand" "=a")
(match_operand:SI 1 "s390_plus_operand" "")
- (match_operand:SI 2 "register_operand" "=&a")])]
+ (match_operand:DI 2 "register_operand" "=&a")])]
"!TARGET_64BIT"
"
{