diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-21 13:13:18 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-21 13:13:18 +0000 |
commit | cf390feefba1b3f971293e3fd3685871985e7ffb (patch) | |
tree | a0bd6473f2f9f1d04d4d139b9f82a8be7f53935e /gcc | |
parent | 2b832fde5655ca7482a779846d6e0497faf0c645 (diff) | |
download | ppe42-gcc-cf390feefba1b3f971293e3fd3685871985e7ffb.tar.gz ppe42-gcc-cf390feefba1b3f971293e3fd3685871985e7ffb.zip |
PR target/11805
* config/h8300/h8300.md (two anonymous patterns): Remove.
* testsuite/gcc.c-torture/compile/20030821-1.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70643 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.md | 37 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20030821-1.c | 24 |
4 files changed, 34 insertions, 37 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0537af7b419..6d8de7de8d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-08-21 Kazu Hirata <kazu@cs.umass.edu> + + PR target/11805 + * config/h8300/h8300.md (two anonymous patterns): Remove. + 2003-08-21 Richard Sandiford <rsandifo@redhat.com> * config/mips/mips.h (MUST_PASS_IN_STACK): Remove BLKmode clause. diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 8fe74507cd0..b17a03ead80 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -652,43 +652,6 @@ (match_dup 3)))] "operands[3] = GEN_INT (INTVAL (operands[1]) - 16);") -(define_insn "" - [(set (cc0) - (and:HI (match_operand:HI 0 "register_operand" "r") - (match_operand:HI 1 "single_one_operand" "n")))] - "" - "* -{ - operands[1] = GEN_INT (INTVAL (operands[1]) & 0xffff); - if (INTVAL (operands[1]) > 128) - { - operands[1] = GEN_INT (INTVAL (operands[1]) >> 8); - return \"btst\\t%V1,%t0\"; - } - return \"btst\\t%V1,%s0\"; -}" - [(set_attr "length" "2") - (set_attr "cc" "set_zn")]) - -(define_insn "" - [(set (cc0) - (and:SI (match_operand:SI 0 "register_operand" "r") - (match_operand:SI 1 "single_one_operand" "n")))] - "(TARGET_H8300H || TARGET_H8300S) - && (INTVAL (operands[1]) & 0xffff) != 0" - "* -{ - operands[1] = GEN_INT (INTVAL (operands[1]) & 0xffff); - if (INTVAL (operands[1]) > 128) - { - operands[1] = GEN_INT (INTVAL (operands[1]) >> 8); - return \"btst\\t%V1,%x0\"; - } - return \"btst\\t%V1,%w0\"; -}" - [(set_attr "length" "2") - (set_attr "cc" "set_zn")]) - (define_insn "tstqi" [(set (cc0) (match_operand:QI 0 "register_operand" "r"))] "" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 567065258e5..65d03080db4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-08-21 Kazu Hirata <kazu@cs.umass.edu> + + PR target/11805 + * gcc.c-torture/compile/20030821-1.c: New. + 2003-08-20 Mark Mitchell <mark@codesourcery.com> PR c++/11834 diff --git a/gcc/testsuite/gcc.c-torture/compile/20030821-1.c b/gcc/testsuite/gcc.c-torture/compile/20030821-1.c new file mode 100644 index 00000000000..34700ae181f --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20030821-1.c @@ -0,0 +1,24 @@ +/* PR target/11805. */ + +/* Consider the following sequence. + + (set (cc0) + (and:HI (reg:HI 0) + (const_int 1))) + + (set (pc) + (if_then_else (le (cc0) + (const_int 0)) + (label_ref 17) + (pc))) + + On h8300, the first insn does not set the overflow flag, but the + second requires the overflow flag. As a result, when the final + wants to output the jump insn, it cannot find a test insn that + gives appropriate condition flags. */ + +unsigned char +foo (unsigned char a) +{ + return (a & 1) > 0; +} |