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