blob: 0c80cf8164d1da75e6fdeb827f9aef867f81644e [file] [log] [blame]
Andrew Geisslera9ff2b32020-10-16 10:11:54 -05001From 87da245d89fffe6a025037b4a53f66dafa7e1f84 Mon Sep 17 00:00:00 2001
Brad Bishop26bdd442019-08-16 17:08:17 -04002From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Thu, 23 Feb 2017 17:09:04 +0530
Andrew Geisslera9ff2b32020-10-16 10:11:54 -05004Subject: [PATCH 31/58] Fixing the issue with the builtin_alloc.
5
6register r18 was not properly handling the stack pattern
7which was resolved by using free available register
Brad Bishop286d45c2018-10-02 15:21:57 -04008
Brad Bishop26bdd442019-08-16 17:08:17 -04009signed-off-by:nagaraju mekala <nmekala@xilinx.com>
Brad Bishop286d45c2018-10-02 15:21:57 -040010---
11 gcc/config/microblaze/microblaze.md | 8 ++++----
12 1 file changed, 4 insertions(+), 4 deletions(-)
13
14diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
Andrew Geisslera9ff2b32020-10-16 10:11:54 -050015index fa6aabdb9d4..9de46d0ce24 100644
Brad Bishop286d45c2018-10-02 15:21:57 -040016--- a/gcc/config/microblaze/microblaze.md
17+++ b/gcc/config/microblaze/microblaze.md
Andrew Geissler84ad7c52020-06-27 00:00:16 -050018@@ -2078,10 +2078,10 @@
Brad Bishop286d45c2018-10-02 15:21:57 -040019 ""
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 Geissler84ad7c52020-06-27 00:00:16 -050031@@ -2090,9 +2090,9 @@
Brad Bishop286d45c2018-10-02 15:21:57 -040032 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 Geisslera9ff2b32020-10-16 10:11:54 -0500442.17.1
Brad Bishop286d45c2018-10-02 15:21:57 -040045