diff options
author | raeburn <raeburn@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-11 02:21:54 +0000 |
---|---|---|
committer | raeburn <raeburn@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-11 02:21:54 +0000 |
commit | efea460c5eda4c7369e81ba7c7ebc6a27f8eccc2 (patch) | |
tree | 7d04180ff0e97d1e5bb80e16c8389a2a43d9e018 /gcc/calls.c | |
parent | 5eabf72a2dc1dba34d9d1a1386692418b448722d (diff) | |
download | gcc-efea460c5eda4c7369e81ba7c7ebc6a27f8eccc2.tar.gz |
Fine-grained control of -fcheck-memory-usage with new no_check_memory_usage
attribute. Misc minor bugfixes and tests for it too.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22983 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 2bddc2a32a1..c44617e6bb4 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -595,7 +595,7 @@ expand_call (exp, target, ignore) if -fcheck-memory-usage, code which invokes functions (and thus damages some hard registers) can be inserted before using the value. So, target is always a pseudo-register in that case. */ - if (flag_check_memory_usage) + if (current_function_check_memory_usage) target = 0; /* See if we can find a DECL-node for the actual function. @@ -1625,7 +1625,7 @@ expand_call (exp, target, ignore) pop_temp_slots (); /* FUNEXP can't be BLKmode */ /* Check the function is executable. */ - if (flag_check_memory_usage) + if (current_function_check_memory_usage) emit_library_call (chkr_check_exec_libfunc, 1, VOIDmode, 1, funexp, ptr_mode); @@ -1864,7 +1864,7 @@ expand_call (exp, target, ignore) NULL_RTX))); /* Mark the memory for the aggregate as write-only. */ - if (flag_check_memory_usage) + if (current_function_check_memory_usage) emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3, structure_value_addr, ptr_mode, @@ -3508,15 +3508,13 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl, if (arg->value == arg->stack) { - /* If the value is already in the stack slot, we are done. */ - if (flag_check_memory_usage && GET_CODE (arg->stack) == MEM) + /* If the value is already in the stack slot, we are done moving + data. */ + if (current_function_check_memory_usage && GET_CODE (arg->stack) == MEM) { - if (arg->mode == BLKmode) - abort (); - emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3, XEXP (arg->stack, 0), ptr_mode, - GEN_INT (GET_MODE_SIZE (arg->mode)), + ARGS_SIZE_RTX (arg->size), TYPE_MODE (sizetype), GEN_INT (MEMORY_USE_RW), TYPE_MODE (integer_type_node)); |