diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-01-17 13:32:49 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2001-01-17 13:32:49 +0100 |
commit | d70401eb2fc86f75d6a8ad6eda48386292b4a856 (patch) | |
tree | 1fd1be2fbee11b1cc232cc61610beba740738171 /gcc | |
parent | 5efdd890289db3b99ae2c9abcf5cb12d677f22bb (diff) | |
download | gcc-d70401eb2fc86f75d6a8ad6eda48386292b4a856.zip gcc-d70401eb2fc86f75d6a8ad6eda48386292b4a856.tar.gz gcc-d70401eb2fc86f75d6a8ad6eda48386292b4a856.tar.bz2 |
i386.md (cmpqi_minus_1): Use q constraints instead of r.
* config/i386/i386.md (cmpqi_minus_1): Use q constraints instead of r.
* gcc.c-torture/compile/20010117-2.c: New test.
From-SVN: r39093
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 1 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20010117-2.c | 20 |
4 files changed, 24 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2ab5dce..37baa52 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,7 @@ 2001-01-17 Jakub Jelinek <jakub@redhat.com> * config/i386/i386.md (cmpqi_minus_1): Use {b} for QImode operation. + Use q constraints instead of r. Tue Jan 16 22:23:04 2001 Alan Modra (alan@linuxcare.com.au) diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 99111ac..125b9fc 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -1154,8 +1154,8 @@ (define_insn "*cmpqi_minus_1" [(set (reg 17) - (compare (minus:QI (match_operand:QI 0 "nonimmediate_operand" "rm,r") - (match_operand:QI 1 "general_operand" "ri,mr")) + (compare (minus:QI (match_operand:QI 0 "nonimmediate_operand" "qm,q") + (match_operand:QI 1 "general_operand" "qi,mq")) (const_int 0)))] "ix86_match_ccmode (insn, CCGOCmode)" "cmp{b}\\t{%1, %0|%0, %1}" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7ff22a2..4dc5f06 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,7 @@ 2001-01-17 Jakub Jelinek <jakub@redhat.com> * gcc.c-torture/compile/20010117-1.c: New test. + * gcc.c-torture/compile/20010117-2.c: New test. 2001-01-15 Toon Moene <toon@moene.indiv.nluug.nl> diff --git a/gcc/testsuite/gcc.c-torture/compile/20010117-2.c b/gcc/testsuite/gcc.c-torture/compile/20010117-2.c new file mode 100644 index 0000000..813468b --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20010117-2.c @@ -0,0 +1,20 @@ +unsigned char a, b; + +void baz (void) +{ + if (b & 0x08) + { + int g = 0; + int c = (b & 0x01); + int d = a - g - c; + int e = (a & 0x0f) - (g & 0x0f); + int f = (a & 0xf0) - (g & 0xf0); + int h = (a & 0x0f) - (g & 0x0f); + + if ((a ^ g) & (a ^ d) & 0x80) b |= 0x40; + if ((d & 0xff00) == 0) b |= 0x01; + if (!((a - h - c) & 0xff)) b |= 0x02; + if ((a - g - c) & 0x80) b |= 0x80; + a = (e & 0x0f) | (f & 0xf0); + } +} |