diff options
author | Bernd Schmidt <bernd.schmidt@analog.com> | 2006-12-07 11:06:08 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2006-12-07 11:06:08 +0000 |
commit | 58f76679659f6d1e107bf9d2072a2f7bca63c763 (patch) | |
tree | 644b390ba87790374fc4ca260bd2f131e3227024 /gcc | |
parent | e0d9d0ddb643a4e9372e3bb1104ce299a200df45 (diff) | |
download | gcc-58f76679659f6d1e107bf9d2072a2f7bca63c763.zip gcc-58f76679659f6d1e107bf9d2072a2f7bca63c763.tar.gz gcc-58f76679659f6d1e107bf9d2072a2f7bca63c763.tar.bz2 |
bfin.c (print_operand): New modifier 'N' for constants.
* config/bfin/bfin.c (print_operand): New modifier 'N' for constants.
* config/bfin/bfin.md (ssashiftv2hi3, ssashifthi3, lshiftv2hi3,
lshifthi3): Use it, and fix the order of alternatives.
From-SVN: r119616
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/bfin/bfin.c | 2 | ||||
-rw-r--r-- | gcc/config/bfin/bfin.md | 16 |
3 files changed, 16 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 33bd102..ad6b37e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-12-07 Bernd Schmidt <bernd.schmidt@analog.com> + + * config/bfin/bfin.c (print_operand): New modifier 'N' for constants. + * config/bfin/bfin.md (ssashiftv2hi3, ssashifthi3, lshiftv2hi3, + lshifthi3): Use it, and fix the order of alternatives. + 2006-12-07 Nick Clifton <nickc@redhat.com> * common.opt (record-gcc-switches): New command line switch. diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 48fcbd13..abfeaee 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -1381,6 +1381,8 @@ print_operand (FILE *file, rtx x, char code) x = GEN_INT ((INTVAL (x) >> 16) & 0xffff); else if (code == 'h') x = GEN_INT (INTVAL (x) & 0xffff); + else if (code == 'N') + x = GEN_INT (-INTVAL (x)); else if (code == 'X') x = GEN_INT (exact_log2 (0xffffffff & INTVAL (x))); else if (code == 'Y') diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md index d6c5d7f..4542327 100644 --- a/gcc/config/bfin/bfin.md +++ b/gcc/config/bfin/bfin.md @@ -3312,8 +3312,8 @@ "" "@ %0 = ASHIFT %1 BY %2 (V, S)%! - %0 = %1 >>> %2 (V,S)%! - %0 = %1 << %2 (V,S)%!" + %0 = %1 << %2 (V,S)%! + %0 = %1 >>> %N2 (V,S)%!" [(set_attr "type" "dsp32")]) (define_insn "ssashifthi3" @@ -3326,8 +3326,8 @@ "" "@ %0 = ASHIFT %1 BY %2 (V, S)%! - %0 = %1 >>> %2 (V,S)%! - %0 = %1 << %2 (V,S)%!" + %0 = %1 << %2 (V,S)%! + %0 = %1 >>> %N2 (V,S)%!" [(set_attr "type" "dsp32")]) (define_insn "lshiftv2hi3" @@ -3340,8 +3340,8 @@ "" "@ %0 = LSHIFT %1 BY %2 (V)%! - %0 = %1 >> %2 (V)%! - %0 = %1 << %2 (V)%!" + %0 = %1 << %2 (V)%! + %0 = %1 >> %N2 (V)%!" [(set_attr "type" "dsp32")]) (define_insn "lshifthi3" @@ -3354,7 +3354,7 @@ "" "@ %0 = LSHIFT %1 BY %2 (V)%! - %0 = %1 >> %2 (V)%! - %0 = %1 << %2 (V)%!" + %0 = %1 << %2 (V)%! + %0 = %1 >> %N2 (V)%!" [(set_attr "type" "dsp32")]) |