This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Patch to allow spill slot alignment greater than the stack alignment
- From: Steve Ellcey <sellcey at imgtec dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 6 Oct 2015 11:02:02 -0700
- Subject: Re: RFC: Patch to allow spill slot alignment greater than the stack alignment
- Authentication-results: sourceware.org; auth=none
- References: <1443819469 dot 8687 dot 182 dot camel at ubuntu-sellcey> <561237B9 dot 1080602 at redhat dot com> <1444061411 dot 8687 dot 207 dot camel at ubuntu-sellcey> <CAMe9rOr17KDCXzNoAZN6fgXXJ1MMu-enkDw_ykAPpSQAeiAnWQ at mail dot gmail dot com> <1444063572 dot 8687 dot 219 dot camel at ubuntu-sellcey> <CAMe9rOq5um+cOh2=ibgg10u7WDGSQP80MoDCqHszMa-uz-s3fg at mail dot gmail dot com> <1444145408 dot 8687 dot 238 dot camel at ubuntu-sellcey> <5613EB22 dot 4020505 at redhat dot com>
- Reply-to: <sellcey at imgtec dot com>
On Tue, 2015-10-06 at 17:39 +0200, Bernd Schmidt wrote:
>
> Did your tag that copy as RTX_FRAME_RELATED? I'd expect dwarf2cfi would
> ignore instructions with that bit unset. There's even a comment
> indicating arm does something like this:
Yes, I had marked it as RTX_FRAME_RELATED. When I took that out things
looked better (well, maybe just different).
If I remove that and I change Rule #16 to handle an AND with a register
I get odd looking .cfi stuff. The AND instruction (which is marked with
RTX_FRAME_RELATED) seems to generate these cfi_escape macros:
.cfi_escape 0x10,0x1f,0x2,0x8e,0x7c
.cfi_escape 0x10,0x1e,0x2,0x8e,0x78
.cfi_escape 0x10,0xc,0x2,0x8e,0x74
which are meaningless to me. What I found works better is to skip the
dwarf2cfi.c changes and explicitly attach this note to the AND
instruction:
cfi_note = alloc_reg_note (REG_CFA_DEF_CFA, stack_pointer_rtx, NULL_RTX);
REG_NOTES (insn) = cfi_note;
When I do this the only unexpected test suite execution failures I see
are ones that call the C++ set_unexpected function.
FYI: The reason I was copying the stack pointer to another register was
to use that other register as my argument pointer (needed after the
stack pointer got aligned) and to use it to restore the stack pointer at
the end of the function for normal returns.
Steve Ellcey
sellcey@imgtec.com