Second half of fix for PR toolchain/19265.

2003-03-14  Jason Thorpe  <thorpej@wasabisystems.com>

	* c-decl.c (flag_hosted): Move from here...
	* toplev.c: ...to here.
	* c-tree.h (flag_hosted): Move extern declaration from here...
	* flags.h: ...to here.
	* config/alpha/alpha.c (alpha_initialize_trampoline): Only
	emit a call to __enable_execute_stack if flag_hosted is true.
	* config/i386/i386.c (x86_initialize_trampoline): Likewise.
	* config/sparc/sparc.c (sparc_initialize_trampoline)
	(sparc64_initialize_trampoline): Likewise.

An updated version of this will be submitted to gcc.gnu.org.
This commit is contained in:
thorpej 2003-03-14 23:48:00 +00:00
parent d8108972ba
commit d9cf1a068e
7 changed files with 23 additions and 16 deletions

View File

@ -490,10 +490,6 @@ int flag_traditional;
int flag_isoc9x = 0;
/* Nonzero means that we have builtin functions, and main is an int */
int flag_hosted = 1;
/* Nonzero means to allow single precision math even if we're generally
being traditional. */
int flag_allow_single_precision = 0;

View File

@ -439,10 +439,6 @@ extern int flag_cond_mismatch;
extern int flag_no_asm;
/* Nonzero means environment is hosted (i.e., not freestanding) */
extern int flag_hosted;
/* Nonzero means warn about implicit declarations. */
extern int warn_implicit;

View File

@ -3069,6 +3069,7 @@ alpha_initialize_trampoline (tramp, fnaddr, cxt, fnofs, cxtofs, jmpofs)
}
#ifdef TRANSFER_FROM_TRAMPOLINE
if (flag_hosted)
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
0, VOIDmode, 1, tramp, Pmode);
#endif

View File

@ -5763,6 +5763,7 @@ x86_initialize_trampoline (tramp, fnaddr, cxt)
emit_move_insn (gen_rtx_MEM (SImode, plus_constant (tramp, 6)), disp);
#ifdef TRANSFER_FROM_TRAMPOLINE
if (flag_hosted)
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
0, VOIDmode, 1, tramp, Pmode);
#endif

View File

@ -5671,6 +5671,7 @@ sparc_initialize_trampoline (tramp, fnaddr, cxt)
JMPL r+i,d = 10dd ddd1 1100 0rrr rr1i iiii iiii iiii
*/
#ifdef TRANSFER_FROM_TRAMPOLINE
if (flag_hosted)
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
0, VOIDmode, 1, tramp, Pmode);
#endif
@ -5718,6 +5719,7 @@ sparc64_initialize_trampoline (tramp, fnaddr, cxt)
rtx tramp, fnaddr, cxt;
{
#ifdef TRANSFER_FROM_TRAMPOLINE
if (flag_hosted)
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
0, VOIDmode, 1, tramp, Pmode);
#endif

View File

@ -522,6 +522,10 @@ extern int g_switch_set;
extern int inline_max_insns;
/* Nonzero means environment is hosted (i.e., not freestanding) */
extern int flag_hosted;
/* Nonzero if we dump in VCG format, not plain text. */
extern int dump_for_graph;

View File

@ -313,6 +313,13 @@ int mach_dep_reorg_dump = 0;
#endif
enum graph_dump_types graph_dump_format;
/* Nonzero if we're in a hosted environment. For C, that means that
we have built-in functions, and main is an int. This also affects
whether or not we attempt to e.g. enable stack execution for
trampolines. */
int flag_hosted = 1;
/* Name for output file of assembly code, specified with -o. */
char *asm_file_name;