+2017-07-13 Maxim Ostapenko <m.ostapenko@samsung.com>
+
+ * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments
+ during expansion.
+ * builtins.c (expand_asan_emit_allocas_unpoison): Likewise.
+
2017-07-12 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/81193
else
start_sequence ();
rtx ret = init_one_libfunc ("__asan_allocas_unpoison");
+ top = convert_memory_address (ptr_mode, top);
+ bot = convert_memory_address (ptr_mode, bot);
ret = emit_library_call_value (ret, NULL_RTX, LCT_NORMAL, ptr_mode, 2, top,
- TYPE_MODE (pointer_sized_int_node), bot,
- TYPE_MODE (pointer_sized_int_node));
+ ptr_mode, bot, ptr_mode);
do_pending_stack_adjust ();
rtx_insn *insns = get_insns ();
expand_asan_emit_allocas_unpoison (tree exp)
{
tree arg0 = CALL_EXPR_ARG (exp, 0);
- rtx top = expand_expr (arg0, NULL_RTX, GET_MODE (virtual_stack_dynamic_rtx),
- EXPAND_NORMAL);
+ rtx top = expand_expr (arg0, NULL_RTX, ptr_mode, EXPAND_NORMAL);
+ rtx bot = convert_memory_address (ptr_mode, virtual_stack_dynamic_rtx);
rtx ret = init_one_libfunc ("__asan_allocas_unpoison");
ret = emit_library_call_value (ret, NULL_RTX, LCT_NORMAL, ptr_mode, 2, top,
- TYPE_MODE (pointer_sized_int_node),
- virtual_stack_dynamic_rtx,
- TYPE_MODE (pointer_sized_int_node));
+ ptr_mode, bot, ptr_mode);
return ret;
}