aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arc
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@gmail.com>2022-10-10 10:27:12 +0300
committerClaudiu Zissulescu <claziss@gmail.com>2022-10-10 10:32:32 +0300
commit5e81df88cae713bf867c6260df79994d59cac5e5 (patch)
tree161fef272825bee8cdce98d02f2648d3495182ac /gcc/config/arc
parentdecbb5bf7cc7317fefa53f0d64082cf020e85e42 (diff)
downloadgcc-5e81df88cae713bf867c6260df79994d59cac5e5.zip
gcc-5e81df88cae713bf867c6260df79994d59cac5e5.tar.gz
gcc-5e81df88cae713bf867c6260df79994d59cac5e5.tar.bz2
arc: Use negative enter pattern instruction's offsets
The enter pattern instruction contains the necessary information for the dwarf machinery to generate the appropriate dwarf code. This patch is fixing the register offsets related to CFA, and adds a test. gcc/ * config/arc/arc.cc (arc_save_callee_enter): Use negative offsets. gcc/testsuite * gcc.target/arc/enter-dw2-1.c: New file. Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>
Diffstat (limited to 'gcc/config/arc')
-rw-r--r--gcc/config/arc/arc.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc
index db4b56b..7be27e0 100644
--- a/gcc/config/arc/arc.cc
+++ b/gcc/config/arc/arc.cc
@@ -3356,7 +3356,7 @@ arc_save_callee_enter (uint64_t gmask,
reg = gen_rtx_REG (Pmode, RETURN_ADDR_REGNUM);
mem = gen_frame_mem (Pmode, plus_constant (Pmode,
stack_pointer_rtx,
- off));
+ -off));
XVECEXP (insn, 0, indx) = gen_rtx_SET (mem, reg);
RTX_FRAME_RELATED_P (XVECEXP (insn, 0, indx++)) = 1;
off -= UNITS_PER_WORD;
@@ -3370,7 +3370,7 @@ arc_save_callee_enter (uint64_t gmask,
reg = gen_rtx_REG (SImode, regno);
mem = gen_frame_mem (SImode, plus_constant (Pmode,
stack_pointer_rtx,
- off));
+ -off));
XVECEXP (insn, 0, indx) = gen_rtx_SET (mem, reg);
RTX_FRAME_RELATED_P (XVECEXP (insn, 0, indx)) = 1;
gmask = gmask & ~(1ULL << regno);
@@ -3380,7 +3380,7 @@ arc_save_callee_enter (uint64_t gmask,
{
mem = gen_frame_mem (Pmode, plus_constant (Pmode,
stack_pointer_rtx,
- off));
+ -off));
XVECEXP (insn, 0, indx) = gen_rtx_SET (mem, hard_frame_pointer_rtx);
RTX_FRAME_RELATED_P (XVECEXP (insn, 0, indx++)) = 1;
off -= UNITS_PER_WORD;