From: Jeff Law <jeffreyalaw@gmail.com>
To: Vineet Gupta <vineetg@rivosinc.com>, gcc-patches@gcc.gnu.org
Cc: kito.cheng@gmail.com, Palmer Dabbelt <palmer@rivosinc.com>,
gnu-toolchain@rivosinc.com
Subject: Re: [PATCH v3 2/2] RISC-V: avoid LUI based const mat in alloca epilogue expansion
Date: Mon, 20 May 2024 21:54:41 -0600 [thread overview]
Message-ID: <5c0457b2-df23-49c4-9baa-a048cd2e56a5@gmail.com> (raw)
In-Reply-To: <20240520233237.109269-2-vineetg@rivosinc.com>
On 5/20/24 5:32 PM, Vineet Gupta wrote:
> This is testsuite clean however there's a dwarf quirk which I want to
> run by the experts. The test that was tripping CI has following
> fragment:
>
> Before patch | After Patch
> ------------------------------------------------------
> li t0,-4096 | addi sp,s0,-2048
> addi t0,t0,560 | .cfi_def_cfa 2, 2048 <- #1
> add sp,s0,t0 | addi sp,sp,-1488
> .cfi_def_cfa 2, 3536 | .cfi_def_cfa_offset 3536 <- #2
> addi sp,sp,1504 | addi sp,sp,1504
> .cfi_def_cfa_offset 2032 | .cfi_def_cfa_offset 2032 <- #3
>
> The dwarf insn #1 and #3 seem ok, however #2 seems dubious to me.
What about it seems dubious? We need a CFA adjustment on each insn that
modifies the stack pointer so that we can unwind at any arbitrary point.
The first adjustment says the prior frame is at sp + 2048. Then it's at
sp + 3536. Then after the final insn the prior frame is at sp+2032.
Jeff
next prev parent reply other threads:[~2024-05-21 3:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 23:32 [PATCH v3 1/2] RISC-V: avoid LUI based const mat in prologue/epilogue expansion [PR/105733] Vineet Gupta
2024-05-20 23:32 ` [PATCH v3 2/2] RISC-V: avoid LUI based const mat in alloca epilogue expansion Vineet Gupta
2024-05-21 3:54 ` Jeff Law [this message]
2024-05-21 15:15 ` Vineet Gupta
2024-05-21 17:38 ` Jeff Law
2024-05-21 17:30 ` [PATCH v3 1/2] RISC-V: avoid LUI based const mat in prologue/epilogue expansion [PR/105733] Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5c0457b2-df23-49c4-9baa-a048cd2e56a5@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gnu-toolchain@rivosinc.com \
--cc=kito.cheng@gmail.com \
--cc=palmer@rivosinc.com \
--cc=vineetg@rivosinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).