Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 1 | From ea79d97f430d554921d94d30cb8db851cce6664b Mon Sep 17 00:00:00 2001 |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
| 3 | Date: Wed, 18 Jan 2017 11:49:58 +0530 |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 4 | Subject: [PATCH 27/58] [Fix, microblaze]: Fix internal compiler error with |
| 5 | msmall-divides |
| 6 | |
| 7 | This patch will fix the internal error microblaze_expand_divide function which comes because |
| 8 | of rtx PLUS where the mem_rtx is of type SI and the operand is of type QImode. |
| 9 | This patch modifies the mem_rtx as QImode and Plus as QImode to fix the error. |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 10 | |
| 11 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
| 12 | Ajit Agarwal <ajitkum@xilinx.com> |
| 13 | ChangeLog: |
| 14 | 2016-02-23 Nagaraju Mekala <nmekala@xilix.com> |
| 15 | Ajit Agarwal <ajitkum@xilinx.com> |
| 16 | |
| 17 | *microblaze.c (microblaze_expand_divide): Update |
| 18 | --- |
| 19 | gcc/config/microblaze/microblaze.c | 2 +- |
| 20 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 21 | |
| 22 | diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 23 | index 73d0e010cda..f7c29ef28f5 100644 |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 24 | --- a/gcc/config/microblaze/microblaze.c |
| 25 | +++ b/gcc/config/microblaze/microblaze.c |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 26 | @@ -3902,7 +3902,7 @@ microblaze_expand_divide (rtx operands[]) |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 27 | emit_insn (gen_ashlsi3_bshift (regt1, operands[1], GEN_INT(4))); |
| 28 | emit_insn (gen_addsi3 (regt1, regt1, operands[2])); |
| 29 | mem_rtx = gen_rtx_MEM (QImode, |
| 30 | - gen_rtx_PLUS (Pmode, regt1, div_table_rtx)); |
| 31 | + gen_rtx_PLUS (QImode, regt1, div_table_rtx)); |
| 32 | |
| 33 | insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx)); |
| 34 | jump = emit_jump_insn_after (gen_jump (div_end_label), insn); |
| 35 | -- |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 36 | 2.17.1 |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 37 | |