#include "config.h"
#include "system.h"
#include "flags.h"
#include "tree.h"
#include "rtl.h"
#include "toplev.h"
#include "output.h"
#include "tm_p.h"
int flag_no_mach_text_sections = 0;
#define OPT_STRCMP(opt) (!strncmp (opt, p, sizeof (opt)-1))
static int pragma_initialized;
static int initial_optimize_flag;
int
handle_pragma (p_getc, p_ungetc, pname)
int (* p_getc) PARAMS ((void)) ATTRIBUTE_UNUSED;
void (* p_ungetc) PARAMS ((int)) ATTRIBUTE_UNUSED;
const char *pname;
{
int retval = 0;
if (!pragma_initialized)
{
pragma_initialized = 1;
initial_optimize_flag = optimize;
}
if (strcmp (pname, "CC_OPT_ON") == 0)
{
optimize = 1;
warning ("optimization turned on");
retval = 1;
}
else if (strcmp (pname, "CC_OPT_OFF") == 0)
{
optimize = 0;
warning ("optimization turned off");
retval = 1;
}
else if (strcmp (pname, "CC_OPT_RESTORE") == 0)
{
extern int initial_optimize_flag;
if (optimize != initial_optimize_flag)
optimize = initial_optimize_flag;
warning ("optimization level restored");
retval = 1;
}
else if (strcmp (pname, "CC_WRITABLE_STRINGS") == 0)
flag_writable_strings = retval = 1;
else if (strcmp (pname, "CC_NON_WRITABLE_STRINGS") == 0)
flag_writable_strings = 0, retval = 1;
else if (strcmp (pname, "CC_NO_MACH_TEXT_SECTIONS") == 0)
flag_no_mach_text_sections = retval = 1;
return retval;
}
void
nextstep_asm_out_constructor (symbol, priority)
rtx symbol;
int priority ATTRIBUTE_UNUSED;
{
constructor_section ();
assemble_align (POINTER_SIZE);
assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
fprintf (asm_out_file, ".reference .constructors_used\n");
}
void
nextstep_asm_out_destructor (symbol, priority)
rtx symbol;
int priority ATTRIBUTE_UNUSED;
{
destructor_section ();
assemble_align (POINTER_SIZE);
assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
fprintf (asm_out_file, ".reference .destructors_used\n");
}