Andrew Geissler | 10fa149 | 2020-12-11 16:25:29 -0600 | [diff] [blame^] | 1 | From fdb2f23a69182da516c7bf89a9e0011e55120f94 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 | 10fa149 | 2020-12-11 16:25:29 -0600 | [diff] [blame^] | 4 | Subject: [PATCH 26/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 |
Andrew Geissler | 10fa149 | 2020-12-11 16:25:29 -0600 | [diff] [blame^] | 14 | index 3e6e2b9276d..d938efcd762 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 |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 17 | @@ -2078,10 +2078,10 @@ |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 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); |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 30 | @@ -2090,9 +2090,9 @@ |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 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 | -- |
Andrew Geissler | a9ff2b3 | 2020-10-16 10:11:54 -0500 | [diff] [blame] | 43 | 2.17.1 |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 44 | |