aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/h8300
diff options
context:
space:
mode:
authorKaushik Phatak <kaushik.phatak@kpitcummins.com>2010-12-14 07:03:36 +0000
committerKaushik Phatak <kaushikp@gcc.gnu.org>2010-12-14 07:03:36 +0000
commitc7e1fa82502f98b4ac9c6e576345debf6b56a654 (patch)
treecfe83b6fc75607a40ae5d0b6130f56d104b7fde4 /gcc/config/h8300
parent05d556e8371b90c5de4175aa737a7ad83726eeee (diff)
downloadgcc-c7e1fa82502f98b4ac9c6e576345debf6b56a654.zip
gcc-c7e1fa82502f98b4ac9c6e576345debf6b56a654.tar.gz
gcc-c7e1fa82502f98b4ac9c6e576345debf6b56a654.tar.bz2
h8300.md (define_split): Add condition for "and with single_zero" splitter to handle 16-bit const operands.
* config/h8300/h8300.md (define_split) : Add condition for "and with single_zero" splitter to handle 16-bit const operands. * config/h8300/h8300.md (define_split) : Add condition for "ior with single_one" splitter to handle 16-bit const operands. * config/h8300/h8300.md (define_split) : Add condition for "xor with single_one" splitter to handle 16-bit const operands. * testsuite/gcc.dg/h8300-bit-insn-ice.c: New. From-SVN: r167789
Diffstat (limited to 'gcc/config/h8300')
-rw-r--r--gcc/config/h8300/h8300.md39
1 files changed, 33 insertions, 6 deletions
diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md
index 513ad4c..21ab391 100644
--- a/gcc/config/h8300/h8300.md
+++ b/gcc/config/h8300/h8300.md
@@ -1779,8 +1779,17 @@
(and:QI (match_dup 1)
(match_dup 2)))]
{
- operands[0] = adjust_address (operands[0], QImode, 1);
- operands[1] = adjust_address (operands[1], QImode, 1);
+ if (abs (INTVAL (operands[2])) > 0xFF)
+ {
+ operands[0] = adjust_address (operands[0], QImode, 0);
+ operands[1] = adjust_address (operands[1], QImode, 0);
+ operands[2] = GEN_INT ((INTVAL (operands[2])) >> 8);
+ }
+ else
+ {
+ operands[0] = adjust_address (operands[0], QImode, 1);
+ operands[1] = adjust_address (operands[1], QImode, 1);
+ }
})
(define_insn "bclrhi_msx"
@@ -1910,8 +1919,17 @@
(ior:QI (match_dup 1)
(match_dup 2)))]
{
- operands[0] = adjust_address (operands[0], QImode, 1);
- operands[1] = adjust_address (operands[1], QImode, 1);
+ if (abs (INTVAL (operands[2])) > 0xFF)
+ {
+ operands[0] = adjust_address (operands[0], QImode, 0);
+ operands[1] = adjust_address (operands[1], QImode, 0);
+ operands[2] = GEN_INT ((INTVAL (operands[2])) >> 8);
+ }
+ else
+ {
+ operands[0] = adjust_address (operands[0], QImode, 1);
+ operands[1] = adjust_address (operands[1], QImode, 1);
+ }
})
(define_insn "bsethi_msx"
@@ -1976,8 +1994,17 @@
(xor:QI (match_dup 1)
(match_dup 2)))]
{
- operands[0] = adjust_address (operands[0], QImode, 1);
- operands[1] = adjust_address (operands[1], QImode, 1);
+ if (abs (INTVAL (operands[2])) > 0xFF)
+ {
+ operands[0] = adjust_address (operands[0], QImode, 0);
+ operands[1] = adjust_address (operands[1], QImode, 0);
+ operands[2] = GEN_INT ((INTVAL (operands[2])) >> 8);
+ }
+ else
+ {
+ operands[0] = adjust_address (operands[0], QImode, 1);
+ operands[1] = adjust_address (operands[1], QImode, 1);
+ }
})
(define_insn "bnothi_msx"