diff mbox

[027/236] asan_emit_stack_protection returns an insn

Message ID 1407345815-14551-28-git-send-email-dmalcolm@redhat.com
State New
Headers show

Commit Message

David Malcolm Aug. 6, 2014, 5:20 p.m. UTC
gcc/
	* asan.h (asan_emit_stack_protection): Strengthen return type from
	rtx to rtx_insn *.
	* asan.c (asan_emit_stack_protection): Likewise.  Add local
	"insns" to hold the return value.
---
 gcc/asan.c | 7 ++++---
 gcc/asan.h | 4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

Comments

Jeff Law Aug. 13, 2014, 3:56 a.m. UTC | #1
On 08/06/14 11:20, David Malcolm wrote:
> gcc/
> 	* asan.h (asan_emit_stack_protection): Strengthen return type from
> 	rtx to rtx_insn *.
> 	* asan.c (asan_emit_stack_protection): Likewise.  Add local
> 	"insns" to hold the return value.
OK.

Jeff
David Malcolm Aug. 19, 2014, 7:45 p.m. UTC | #2
On Tue, 2014-08-12 at 21:56 -0600, Jeff Law wrote:
> On 08/06/14 11:20, David Malcolm wrote:
> > gcc/
> > 	* asan.h (asan_emit_stack_protection): Strengthen return type from
> > 	rtx to rtx_insn *.
> > 	* asan.c (asan_emit_stack_protection): Likewise.  Add local
> > 	"insns" to hold the return value.
> OK.

Thanks; committed to trunk as r214189.
diff mbox

Patch

diff --git a/gcc/asan.c b/gcc/asan.c
index 118f9fc..11627c7 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -960,11 +960,12 @@  asan_function_start (void)
    assigned to PBASE, when not doing use after return protection, or
    corresponding address based on __asan_stack_malloc* return value.  */
 
-rtx
+rtx_insn *
 asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb,
 			    HOST_WIDE_INT *offsets, tree *decls, int length)
 {
   rtx shadow_base, shadow_mem, ret, mem, orig_base, lab;
+  rtx_insn *insns;
   char buf[30];
   unsigned char shadow_bytes[4];
   HOST_WIDE_INT base_offset = offsets[length - 1];
@@ -1234,9 +1235,9 @@  asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb,
   if (lab)
     emit_label (lab);
 
-  ret = get_insns ();
+  insns = get_insns ();
   end_sequence ();
-  return ret;
+  return insns;
 }
 
 /* Return true if DECL, a global var, might be overridden and needs
diff --git a/gcc/asan.h b/gcc/asan.h
index 08d5063..198433f 100644
--- a/gcc/asan.h
+++ b/gcc/asan.h
@@ -23,8 +23,8 @@  along with GCC; see the file COPYING3.  If not see
 
 extern void asan_function_start (void);
 extern void asan_finish_file (void);
-extern rtx asan_emit_stack_protection (rtx, rtx, unsigned int, HOST_WIDE_INT *,
-				       tree *, int);
+extern rtx_insn *asan_emit_stack_protection (rtx, rtx, unsigned int,
+					     HOST_WIDE_INT *, tree *, int);
 extern bool asan_protect_global (tree);
 extern void initialize_sanitizer_builtins (void);
 extern tree asan_dynamic_init_call (bool);