Commit 3a4abd2f by David Malcolm Committed by David Malcolm

asan_emit_stack_protection returns an insn

2014-08-19  David Malcolm  <dmalcolm@redhat.com>

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

From-SVN: r214189
parent ed270997
2014-08-19 David Malcolm <dmalcolm@redhat.com> 2014-08-19 David Malcolm <dmalcolm@redhat.com>
* 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.
2014-08-19 David Malcolm <dmalcolm@redhat.com>
* basic-block.h (bb_note): Strengthen return type from rtx to * basic-block.h (bb_note): Strengthen return type from rtx to
rtx_note *. rtx_note *.
* sched-int.h (bb_note): Likewise. * sched-int.h (bb_note): Likewise.
......
...@@ -974,11 +974,12 @@ asan_function_start (void) ...@@ -974,11 +974,12 @@ asan_function_start (void)
assigned to PBASE, when not doing use after return protection, or assigned to PBASE, when not doing use after return protection, or
corresponding address based on __asan_stack_malloc* return value. */ corresponding address based on __asan_stack_malloc* return value. */
rtx rtx_insn *
asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb, asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb,
HOST_WIDE_INT *offsets, tree *decls, int length) HOST_WIDE_INT *offsets, tree *decls, int length)
{ {
rtx shadow_base, shadow_mem, ret, mem, orig_base, lab; rtx shadow_base, shadow_mem, ret, mem, orig_base, lab;
rtx_insn *insns;
char buf[30]; char buf[30];
unsigned char shadow_bytes[4]; unsigned char shadow_bytes[4];
HOST_WIDE_INT base_offset = offsets[length - 1]; HOST_WIDE_INT base_offset = offsets[length - 1];
...@@ -1248,9 +1249,9 @@ asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb, ...@@ -1248,9 +1249,9 @@ asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb,
if (lab) if (lab)
emit_label (lab); emit_label (lab);
ret = get_insns (); insns = get_insns ();
end_sequence (); end_sequence ();
return ret; return insns;
} }
/* Return true if DECL, a global var, might be overridden and needs /* Return true if DECL, a global var, might be overridden and needs
......
...@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see
extern void asan_function_start (void); extern void asan_function_start (void);
extern void asan_finish_file (void); extern void asan_finish_file (void);
extern rtx asan_emit_stack_protection (rtx, rtx, unsigned int, HOST_WIDE_INT *, extern rtx_insn *asan_emit_stack_protection (rtx, rtx, unsigned int,
tree *, int); HOST_WIDE_INT *, tree *, int);
extern bool asan_protect_global (tree); extern bool asan_protect_global (tree);
extern void initialize_sanitizer_builtins (void); extern void initialize_sanitizer_builtins (void);
extern tree asan_dynamic_init_call (bool); extern tree asan_dynamic_init_call (bool);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment