Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 1 | From 87da245d89fffe6a025037b4a53f66dafa7e1f84 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
| 3 | Date: Thu, 23 Feb 2017 17:09:04 +0530 |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 4 | Subject: [PATCH 31/58] Fixing the issue with the builtin_alloc. |
| 5 | |
| 6 | register r18 was not properly handling the stack pattern |
| 7 | which was resolved by using free available register |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 8 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 9 | signed-off-by:nagaraju mekala <nmekala@xilinx.com> |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 10 | --- |
| 11 | gcc/config/microblaze/microblaze.md | 8 ++++---- |
| 12 | 1 file changed, 4 insertions(+), 4 deletions(-) |
| 13 | |
| 14 | 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^] | 15 | index fa6aabdb9d4..9de46d0ce24 100644 |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 16 | --- a/gcc/config/microblaze/microblaze.md |
| 17 | +++ b/gcc/config/microblaze/microblaze.md |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 18 | @@ -2078,10 +2078,10 @@ |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 19 | "" |
| 20 | { |
| 21 | rtx retaddr = gen_rtx_MEM (Pmode, stack_pointer_rtx); |
| 22 | - rtx rtmp = gen_rtx_REG (SImode, R_TMP); |
| 23 | + rtx reg = gen_reg_rtx (Pmode); |
| 24 | rtx neg_op0; |
| 25 | |
| 26 | - emit_move_insn (rtmp, retaddr); |
| 27 | + emit_move_insn (reg, retaddr); |
| 28 | if (GET_CODE (operands[1]) != CONST_INT) |
| 29 | { |
| 30 | neg_op0 = gen_reg_rtx (Pmode); |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 31 | @@ -2090,9 +2090,9 @@ |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 32 | neg_op0 = GEN_INT (- INTVAL (operands[1])); |
| 33 | |
| 34 | emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, neg_op0)); |
| 35 | - emit_move_insn (gen_rtx_MEM (Pmode, stack_pointer_rtx), rtmp); |
| 36 | + emit_move_insn (gen_rtx_MEM (Pmode, stack_pointer_rtx), reg); |
| 37 | emit_move_insn (operands[0], virtual_stack_dynamic_rtx); |
| 38 | - emit_insn (gen_rtx_CLOBBER (SImode, rtmp)); |
| 39 | + emit_insn (gen_rtx_CLOBBER (SImode, reg)); |
| 40 | DONE; |
| 41 | } |
| 42 | ) |
| 43 | -- |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame^] | 44 | 2.17.1 |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 45 | |