From: uweigand Date: Sat, 22 Mar 2003 17:52:10 +0000 (+0000) Subject: * config/s390/s390.md ("movti", "*movdi_31", "*movdf_31"): Use 'o' instead X-Git-Tag: upstream/4.9.2~80746 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=37793c2df441e79a4807d6bbf8d0df83968df0ad;p=platform%2Fupstream%2Flinaro-gcc.git * config/s390/s390.md ("movti", "*movdi_31", "*movdf_31"): Use 'o' instead of 'm' constraint in forced-split alternatives. ("*adddi3_31", "*subdi3_31"): Likewise. Also, pass 0 instead of 1 as VALIDATE_ADDRESS parameter to operand_subword. * gcc.dg/20030321-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64718 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2c52441..c7d76cb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-03-22 Ulrich Weigand + + * config/s390/s390.md ("movti", "*movdi_31", "*movdf_31"): Use 'o' instead + of 'm' constraint in forced-split alternatives. + ("*adddi3_31", "*subdi3_31"): Likewise. Also, pass 0 instead of 1 as + VALIDATE_ADDRESS parameter to operand_subword. + 2003-03-22 Kazu Hirata * config/h8300/h8300.c (notice_update_cc): Correctly handle diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 370dceb..d357df0 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -904,8 +904,8 @@ ; (define_insn "movti" - [(set (match_operand:TI 0 "nonimmediate_operand" "=d,Q,d,m,Q") - (match_operand:TI 1 "general_operand" "Q,d,dKm,d,Q"))] + [(set (match_operand:TI 0 "nonimmediate_operand" "=d,Q,d,o,Q") + (match_operand:TI 1 "general_operand" "Q,d,dKo,d,Q"))] "TARGET_64BIT" "@ lmg\\t%0,%N0,%1 @@ -1043,8 +1043,8 @@ (set_attr "type" "lr,load,store,floadd,floadd,fstored,cs")]) (define_insn "*movdi_31" - [(set (match_operand:DI 0 "nonimmediate_operand" "=d,Q,d,m,!*f,!*f,!m,Q") - (match_operand:DI 1 "general_operand" "Q,d,dKm,d,*f,m,*f,Q"))] + [(set (match_operand:DI 0 "nonimmediate_operand" "=d,Q,d,o,!*f,!*f,!m,Q") + (match_operand:DI 1 "general_operand" "Q,d,dKo,d,*f,m,*f,Q"))] "!TARGET_64BIT" "@ lm\\t%0,%N0,%1 @@ -1353,8 +1353,8 @@ (set_attr "type" "floadd,floadd,fstored,lr,load,store,cs")]) (define_insn "*movdf_31" - [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,m,d,Q,d,m,Q") - (match_operand:DF 1 "general_operand" "f,m,f,Q,d,dKm,d,Q"))] + [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,m,d,Q,d,o,Q") + (match_operand:DF 1 "general_operand" "f,m,f,Q,d,dKo,d,Q"))] "!TARGET_64BIT" "@ ldr\\t%0,%1 @@ -3034,7 +3034,7 @@ (define_insn_and_split "*adddi3_31" [(set (match_operand:DI 0 "register_operand" "=&d") (plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0") - (match_operand:DI 2 "general_operand" "dm") ) ) + (match_operand:DI 2 "general_operand" "do") ) ) (clobber (reg:CC 33))] "!TARGET_64BIT" "#" @@ -3055,12 +3055,12 @@ [(set (match_dup 3) (plus:SI (match_dup 3) (const_int 1))) (clobber (reg:CC 33))]) (match_dup 9)] - "operands[3] = operand_subword (operands[0], 0, 1, DImode); - operands[4] = operand_subword (operands[1], 0, 1, DImode); - operands[5] = operand_subword (operands[2], 0, 1, DImode); - operands[6] = operand_subword (operands[0], 1, 1, DImode); - operands[7] = operand_subword (operands[1], 1, 1, DImode); - operands[8] = operand_subword (operands[2], 1, 1, DImode); + "operands[3] = operand_subword (operands[0], 0, 0, DImode); + operands[4] = operand_subword (operands[1], 0, 0, DImode); + operands[5] = operand_subword (operands[2], 0, 0, DImode); + operands[6] = operand_subword (operands[0], 1, 0, DImode); + operands[7] = operand_subword (operands[1], 1, 0, DImode); + operands[8] = operand_subword (operands[2], 1, 0, DImode); operands[9] = gen_label_rtx ();" [(set_attr "op_type" "NN")]) @@ -3498,7 +3498,7 @@ (define_insn_and_split "*subdi3_31" [(set (match_operand:DI 0 "register_operand" "=&d") (minus:DI (match_operand:DI 1 "register_operand" "0") - (match_operand:DI 2 "general_operand" "dm") ) ) + (match_operand:DI 2 "general_operand" "do") ) ) (clobber (reg:CC 33))] "!TARGET_64BIT" "#" @@ -3519,12 +3519,12 @@ [(set (match_dup 3) (plus:SI (match_dup 3) (const_int -1))) (clobber (reg:CC 33))]) (match_dup 9)] - "operands[3] = operand_subword (operands[0], 0, 1, DImode); - operands[4] = operand_subword (operands[1], 0, 1, DImode); - operands[5] = operand_subword (operands[2], 0, 1, DImode); - operands[6] = operand_subword (operands[0], 1, 1, DImode); - operands[7] = operand_subword (operands[1], 1, 1, DImode); - operands[8] = operand_subword (operands[2], 1, 1, DImode); + "operands[3] = operand_subword (operands[0], 0, 0, DImode); + operands[4] = operand_subword (operands[1], 0, 0, DImode); + operands[5] = operand_subword (operands[2], 0, 0, DImode); + operands[6] = operand_subword (operands[0], 1, 0, DImode); + operands[7] = operand_subword (operands[1], 1, 0, DImode); + operands[8] = operand_subword (operands[2], 1, 0, DImode); operands[9] = gen_label_rtx ();" [(set_attr "op_type" "NN")]) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f0dcd12..34b0946 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2003-03-22 Ulrich Weigand + + * gcc.dg/20030321-1.c: New test. + 2003-03-22 Zack Weinberg * gcc.dg/Wshadow-1.c: Add a dg-warning line. diff --git a/gcc/testsuite/gcc.dg/20030321-1.c b/gcc/testsuite/gcc.dg/20030321-1.c new file mode 100644 index 0000000..228acec --- /dev/null +++ b/gcc/testsuite/gcc.dg/20030321-1.c @@ -0,0 +1,18 @@ +/* This used to ICE on s390 due to displacement overflow + when accessing the low-order subword. */ + +/* { dg-do compile } */ +/* { dg-options "" } */ + +struct array +{ + char align[4092]; + long long elem[2] __attribute__ ((__packed__)); +}; + +long long +test (struct array *array, int i) +{ + return array->elem[i]; +} +