public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Fix a mistake in previous patch.
@ 2022-10-25 13:53 juzhe.zhong
  2022-10-26  9:02 ` Kito Cheng
  0 siblings, 1 reply; 2+ messages in thread
From: juzhe.zhong @ 2022-10-25 13:53 UTC (permalink / raw)
  To: gcc-patches; +Cc: kito.cheng, palmer, Ju-Zhe Zhong

From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>

 I noticed that I have made a mistake in previous patch:
 https://patchwork.sourceware.org/project/gcc/patch/20220817071950.271762-1-juzhe.zhong@rivai.ai/
 
 The previous statement before this patch:
 bool need_barrier_p = (get_frame_size () + cfun->machine->frame.arg_pointer_offset) != 0;
 
 However, I changed it in the previous patch:
 bool need_barrier_p = known_ne (get_frame_size (), cfun->machine->frame.arg_pointer_offset);
 This is incorrect.
 
 Now, I correct this statement in this patch.

gcc/ChangeLog:

	* config/riscv/riscv.cc (riscv_expand_epilogue): Fix statement.

---
 gcc/config/riscv/riscv.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 08354a19c05..50ef38438a2 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -5028,8 +5028,8 @@ riscv_expand_epilogue (int style)
   rtx insn;
 
   /* We need to add memory barrier to prevent read from deallocated stack.  */
-  bool need_barrier_p
-    = known_ne (get_frame_size (), cfun->machine->frame.arg_pointer_offset);
+  bool need_barrier_p = known_ne (get_frame_size ()
+                                  + cfun->machine->frame.arg_pointer_offset, 0);
 
   if (cfun->machine->naked_p)
     {
-- 
2.36.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] RISC-V: Fix a mistake in previous patch.
  2022-10-25 13:53 [PATCH] RISC-V: Fix a mistake in previous patch juzhe.zhong
@ 2022-10-26  9:02 ` Kito Cheng
  0 siblings, 0 replies; 2+ messages in thread
From: Kito Cheng @ 2022-10-26  9:02 UTC (permalink / raw)
  To: juzhe.zhong; +Cc: gcc-patches

Committed with title tweak, thanks

On Tue, Oct 25, 2022 at 9:53 PM <juzhe.zhong@rivai.ai> wrote:
>
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>
>  I noticed that I have made a mistake in previous patch:
>  https://patchwork.sourceware.org/project/gcc/patch/20220817071950.271762-1-juzhe.zhong@rivai.ai/
>
>  The previous statement before this patch:
>  bool need_barrier_p = (get_frame_size () + cfun->machine->frame.arg_pointer_offset) != 0;
>
>  However, I changed it in the previous patch:
>  bool need_barrier_p = known_ne (get_frame_size (), cfun->machine->frame.arg_pointer_offset);
>  This is incorrect.
>
>  Now, I correct this statement in this patch.
>
> gcc/ChangeLog:
>
>         * config/riscv/riscv.cc (riscv_expand_epilogue): Fix statement.
>
> ---
>  gcc/config/riscv/riscv.cc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
> index 08354a19c05..50ef38438a2 100644
> --- a/gcc/config/riscv/riscv.cc
> +++ b/gcc/config/riscv/riscv.cc
> @@ -5028,8 +5028,8 @@ riscv_expand_epilogue (int style)
>    rtx insn;
>
>    /* We need to add memory barrier to prevent read from deallocated stack.  */
> -  bool need_barrier_p
> -    = known_ne (get_frame_size (), cfun->machine->frame.arg_pointer_offset);
> +  bool need_barrier_p = known_ne (get_frame_size ()
> +                                  + cfun->machine->frame.arg_pointer_offset, 0);
>
>    if (cfun->machine->naked_p)
>      {
> --
> 2.36.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-26  9:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 13:53 [PATCH] RISC-V: Fix a mistake in previous patch juzhe.zhong
2022-10-26  9:02 ` Kito Cheng

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).