mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-17 19:49:45 +08:00
arm.c (output_func_epilogue): Check TARGET_ABORT_NORETURN before generating a call to abort for volatile...
* config/arm.c (output_func_epilogue): Check TARGET_ABORT_NORETURN before generating a call to abort for volatile functions. * config/arm.h (ARM_FLAG_ABORT_NORETURN): Define. (TARGET_ABORT_NORETURN): Define. (abort-on-noreturn): New option. From-SVN: r24653
This commit is contained in:
parent
31ee9d6c10
commit
c11145f699
@ -1,3 +1,11 @@
|
||||
Wed Jan 13 16:16:44 1999 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* config/arm.c (output_func_epilogue): Check TARGET_ABORT_NORETURN
|
||||
before generating a call to abort for volatile functions.
|
||||
* config/arm.h (ARM_FLAG_ABORT_NORETURN): Define.
|
||||
(TARGET_ABORT_NORETURN): Define.
|
||||
(abort-on-noreturn): New option.
|
||||
|
||||
Wed Jan 13 13:30:08 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* cccp.c (xstrdup): Renamed from `savestring'. All callers changed.
|
||||
|
@ -5006,7 +5006,7 @@ output_func_epilogue (f, frame_size)
|
||||
goto epilogue_done;
|
||||
|
||||
/* A volatile function should never return. Call abort. */
|
||||
if (volatile_func)
|
||||
if (TARGET_ABORT_NORETURN && volatile_func)
|
||||
{
|
||||
rtx op = gen_rtx (SYMBOL_REF, Pmode, "abort");
|
||||
assemble_external_libcall (op);
|
||||
|
@ -312,6 +312,10 @@ extern char *target_fp_name;
|
||||
big-endian (for backwards compatibility with older versions of GCC). */
|
||||
#define ARM_FLAG_LITTLE_WORDS (0x2000)
|
||||
|
||||
/* Nonzero if a call to abort should be generated if a noreturn
|
||||
function tries to return. */
|
||||
#define ARM_FLAG_ABORT_NORETURN (0x8000)
|
||||
|
||||
#define TARGET_APCS (target_flags & ARM_FLAG_APCS_FRAME)
|
||||
#define TARGET_POKE_FUNCTION_NAME (target_flags & ARM_FLAG_POKE)
|
||||
#define TARGET_FPE (target_flags & ARM_FLAG_FPE)
|
||||
@ -327,6 +331,7 @@ extern char *target_fp_name;
|
||||
#define TARGET_BIG_END (target_flags & ARM_FLAG_BIG_END)
|
||||
#define TARGET_THUMB_INTERWORK (target_flags & ARM_FLAG_THUMB)
|
||||
#define TARGET_LITTLE_WORDS (target_flags & ARM_FLAG_LITTLE_WORDS)
|
||||
#define TARGET_ABORT_NORETURN (target_flags & ARM_FLAG_ABORT_NORETURN)
|
||||
|
||||
/* SUBTARGET_SWITCHES is used to add flags on a per-config basis.
|
||||
Bit 31 is reserved. See riscix.h. */
|
||||
@ -377,6 +382,10 @@ extern char *target_fp_name;
|
||||
{"thumb-interwork", ARM_FLAG_THUMB, \
|
||||
"Support calls between THUMB and ARM instructions sets" }, \
|
||||
{"no-thumb-interwork", -ARM_FLAG_THUMB, "" }, \
|
||||
{"abort-on-noreturn", ARM_FLAG_ABORT_NORETURN, \
|
||||
"Generate a call to abort if a noreturn function returns"}, \
|
||||
{"no-abort-on-noreturn", -ARM_FLAG_ABORT_NORETURN, ""}, \
|
||||
|
||||
SUBTARGET_SWITCHES \
|
||||
{"", TARGET_DEFAULT } \
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user