This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[3.3, 3.4] S/390: Fix PR target/17771


Hello,

this backports the reload_out* fix from mainline to the 3.4 and
3.3 branches, fixing PR target/17771, a regression against 3.2.

For a description of the problem, see:
http://gcc.gnu.org/ml/gcc-patches/2005-01/msg00878.html

Unfortunately I haven't been able to produce a properly reduced
test case due to heavy reload interactions.  But the problem
currently causes very different symptoms (bootstrap failure)
on mainline anyway ...

Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux
on both the 3.4 and 3.3 branch, applied to both branches.

Bye,
Ulrich


ChangeLog:

	PR target/17771
	* config/s390/s390.md ("reload_outti"): Remove predicate for
	output operand.  Abort if operand is not a MEM.
	("reload_outdi", "reload_outdf"): Likewise.


Index: gcc/config/s390/s390.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.md,v
retrieving revision 1.90.4.10
diff -c -p -r1.90.4.10 s390.md
*** gcc/config/s390/s390.md	27 Oct 2004 13:44:40 -0000	1.90.4.10
--- gcc/config/s390/s390.md	27 Jan 2005 02:17:55 -0000
***************
*** 1039,1049 ****
  })
  
  (define_expand "reload_outti"
!   [(parallel [(match_operand:TI 0 "memory_operand" "")
                (match_operand:TI 1 "register_operand" "d")
                (match_operand:DI 2 "register_operand" "=&a")])]
    "TARGET_64BIT"
  {
    s390_load_address (operands[2], XEXP (operands[0], 0));
    operands[0] = replace_equiv_address (operands[0], operands[2]);
    emit_move_insn (operands[0], operands[1]);
--- 1039,1051 ----
  })
  
  (define_expand "reload_outti"
!   [(parallel [(match_operand:TI 0 "" "")
                (match_operand:TI 1 "register_operand" "d")
                (match_operand:DI 2 "register_operand" "=&a")])]
    "TARGET_64BIT"
  {
+   if (GET_CODE (operands[0]) != MEM)
+     abort ();
    s390_load_address (operands[2], XEXP (operands[0], 0));
    operands[0] = replace_equiv_address (operands[0], operands[2]);
    emit_move_insn (operands[0], operands[1]);
***************
*** 1167,1177 ****
  })
  
  (define_expand "reload_outdi"
!   [(parallel [(match_operand:DI 0 "memory_operand" "")
                (match_operand:DI 1 "register_operand" "d")
                (match_operand:SI 2 "register_operand" "=&a")])]
    "!TARGET_64BIT"
  {
    s390_load_address (operands[2], XEXP (operands[0], 0));
    operands[0] = replace_equiv_address (operands[0], operands[2]);
    emit_move_insn (operands[0], operands[1]);
--- 1169,1181 ----
  })
  
  (define_expand "reload_outdi"
!   [(parallel [(match_operand:DI 0 "" "")
                (match_operand:DI 1 "register_operand" "d")
                (match_operand:SI 2 "register_operand" "=&a")])]
    "!TARGET_64BIT"
  {
+   if (GET_CODE (operands[0]) != MEM)
+     abort ();
    s390_load_address (operands[2], XEXP (operands[0], 0));
    operands[0] = replace_equiv_address (operands[0], operands[2]);
    emit_move_insn (operands[0], operands[1]);
***************
*** 1647,1657 ****
  })
  
  (define_expand "reload_outdf"
!   [(parallel [(match_operand:DF 0 "memory_operand" "")
                (match_operand:DF 1 "register_operand" "d")
                (match_operand:SI 2 "register_operand" "=&a")])]
    "!TARGET_64BIT"
  {
    s390_load_address (operands[2], XEXP (operands[0], 0));
    operands[0] = replace_equiv_address (operands[0], operands[2]);
    emit_move_insn (operands[0], operands[1]);
--- 1651,1663 ----
  })
  
  (define_expand "reload_outdf"
!   [(parallel [(match_operand:DF 0 "" "")
                (match_operand:DF 1 "register_operand" "d")
                (match_operand:SI 2 "register_operand" "=&a")])]
    "!TARGET_64BIT"
  {
+   if (GET_CODE (operands[0]) != MEM)
+     abort ();
    s390_load_address (operands[2], XEXP (operands[0], 0));
    operands[0] = replace_equiv_address (operands[0], operands[2]);
    emit_move_insn (operands[0], operands[1]);
-- 
  Dr. Ulrich Weigand
  Linux on zSeries Development
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]