Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 1 | From 2149d85f1f7375dd97bf961b2bdb693d6d931c13 Mon Sep 17 00:00:00 2001 |
| 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
| 3 | Date: Sat, 26 Aug 2017 19:21:46 -0700 |
| 4 | Subject: [PATCH] Fix internal compiler error with msmall-divides |
| 5 | |
| 6 | This patch will fix the internal error microblaze_expand_divide function |
| 7 | which comes because of rtx PLUS where the mem_rtx is of type SI and the |
| 8 | operand is of type QImode. This patch modifies the mem_rtx as QImode and |
| 9 | Plus as QImode to fix the error. |
| 10 | |
| 11 | ChangeLog: |
| 12 | |
| 13 | 2016-02-23 Nagaraju Mekala <nagaraju.mekala@xilinx.com> |
| 14 | Ajit Agarwal <ajitkum@xilinx.com> |
| 15 | |
| 16 | * microblaze.c (microblaze_expand_divide): Update |
| 17 | |
| 18 | Signed-off-by: Nagaraju Mekala <nagaraju.mekala@xilinx.com> |
| 19 | Signed-off-by: Ajit Agarwal <ajitkum@xilinx.com> |
| 20 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> |
| 21 | Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> |
| 22 | Upstream-Status: Pending |
| 23 | --- |
| 24 | gcc/config/microblaze/microblaze.c | 2 +- |
| 25 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 26 | |
| 27 | diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c |
| 28 | index 96bf6e1cab..a41121264e 100644 |
| 29 | --- a/gcc/config/microblaze/microblaze.c |
| 30 | +++ b/gcc/config/microblaze/microblaze.c |
| 31 | @@ -3719,7 +3719,7 @@ microblaze_expand_divide (rtx operands[]) |
| 32 | emit_insn (gen_ashlsi3_bshift (regt1, operands[1], GEN_INT(4))); |
| 33 | emit_insn (gen_addsi3 (regt1, regt1, operands[2])); |
| 34 | mem_rtx = gen_rtx_MEM (QImode, |
| 35 | - gen_rtx_PLUS (Pmode, regt1, div_table_rtx)); |
| 36 | + gen_rtx_PLUS (QImode, regt1, div_table_rtx)); |
| 37 | |
| 38 | insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx)); |
| 39 | jump = emit_jump_insn_after (gen_jump (div_end_label), insn); |
| 40 | -- |
| 41 | 2.14.2 |
| 42 | |