Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 1 | From 98018d020d9fbae38ea19627dec64d03d7f21fac Mon Sep 17 00:00:00 2001 |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 3 | Date: Tue, 17 Jan 2017 18:18:41 +0530 |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 4 | Subject: [PATCH 23/58] [Patch, microblaze]: Update ashlsi3 & movsf patterns |
| 5 | |
| 6 | This patch removes the use of HOST_WIDE_INT_PRINT_HEX macro in |
| 7 | print_operand of ashlsi3_with_mul_nodelay,ashlsi3_with_mul_delay |
| 8 | and movsf_internal patterns beacuse HOST_WIDE_INT_PRINT_HEX |
| 9 | is generating 64-bit value which our instruction doesn't support |
| 10 | so using gen_int_mode function |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 11 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 12 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
| 13 | :Ajit Agarwal <ajitkum@xilinx.com> |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 14 | |
| 15 | ChangeLog: |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 16 | 2016-01-07 Nagaraju Mekala <nmekala@xilix.com> |
| 17 | Ajit Agarwal <ajitkum@xilinx.com> |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 18 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 19 | *microblaze.md (ashlsi3_with_mul_nodelay, |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 20 | ashlsi3_with_mul_delay, |
| 21 | movsf_internal): |
| 22 | Updated the patterns to use gen_int_mode function |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 23 | *microblaze.c (print_operand): |
| 24 | updated the 'F' case to use "unsinged int" instead |
| 25 | of HOST_WIDE_INT_PRINT_HEX |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 26 | --- |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 27 | gcc/config/microblaze/microblaze.md | 10 ++++++++-- |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 28 | 1 file changed, 8 insertions(+), 2 deletions(-) |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 29 | |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 30 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 31 | index efd2c34e0b7..be8bbda2bfb 100644 |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 32 | --- a/gcc/config/microblaze/microblaze.md |
| 33 | +++ b/gcc/config/microblaze/microblaze.md |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 34 | @@ -1368,7 +1368,10 @@ |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 35 | (match_operand:SI 2 "immediate_operand" "I")))] |
| 36 | "!TARGET_SOFT_MUL |
| 37 | && ((1 << INTVAL (operands[2])) <= 32767 && (1 << INTVAL (operands[2])) >= -32768)" |
| 38 | - "muli\t%0,%1,%m2" |
| 39 | + { |
| 40 | + operands[2] = gen_int_mode (1 << INTVAL (operands[2]), SImode); |
| 41 | + return "muli\t%0,%1,%2"; |
| 42 | + } |
| 43 | ;; This MUL will not generate an imm. Can go into a delay slot. |
| 44 | [(set_attr "type" "arith") |
| 45 | (set_attr "mode" "SI") |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 46 | @@ -1380,7 +1383,10 @@ |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 47 | (ashift:SI (match_operand:SI 1 "register_operand" "d") |
| 48 | (match_operand:SI 2 "immediate_operand" "I")))] |
| 49 | "!TARGET_SOFT_MUL" |
| 50 | - "muli\t%0,%1,%m2" |
| 51 | + { |
| 52 | + operands[2] = gen_int_mode (1 << INTVAL (operands[2]), SImode); |
| 53 | + return "muli\t%0,%1,%2"; |
| 54 | + } |
| 55 | ;; This MUL will generate an IMM. Cannot go into a delay slot |
| 56 | [(set_attr "type" "no_delay_arith") |
| 57 | (set_attr "mode" "SI") |
| 58 | -- |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 59 | 2.17.1 |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 60 | |