public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3506] RISC-V: Fix epilogue generation for barrier.
@ 2022-10-26  9:05 Kito Cheng
  0 siblings, 0 replies; only message in thread
From: Kito Cheng @ 2022-10-26  9:05 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4329d111f48cba9ea560fc0a36f4cb5a290decb2

commit r13-3506-g4329d111f48cba9ea560fc0a36f4cb5a290decb2
Author: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Date:   Tue Oct 25 21:53:23 2022 +0800

    RISC-V: Fix epilogue generation for barrier.
    
     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.

Diff:
---
 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 fac8def31d8..3d02954ffce 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -5025,8 +5025,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)
     {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-26  9:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26  9:05 [gcc r13-3506] RISC-V: Fix epilogue generation for barrier 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).