00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "config.h"
00023 #include "system.h"
00024 #include "flags.h"
00025 #include "tree.h"
00026 #include "rtl.h"
00027 #include "toplev.h"
00028 #include "output.h"
00029 #include "tm_p.h"
00030
00031
00032
00033 int flag_no_mach_text_sections = 0;
00034
00035 #define OPT_STRCMP(opt) (!strncmp (opt, p, sizeof (opt)-1))
00036
00037
00038
00039 static int pragma_initialized;
00040
00041
00042
00043 static int initial_optimize_flag;
00044
00045
00046
00047
00048
00049
00050 int
00051 handle_pragma (p_getc, p_ungetc, pname)
00052 int (* p_getc) PARAMS ((void)) ATTRIBUTE_UNUSED;
00053 void (* p_ungetc) PARAMS ((int)) ATTRIBUTE_UNUSED;
00054 const char *pname;
00055 {
00056 int retval = 0;
00057
00058
00059 if (!pragma_initialized)
00060 {
00061 pragma_initialized = 1;
00062 initial_optimize_flag = optimize;
00063 }
00064
00065 if (strcmp (pname, "CC_OPT_ON") == 0)
00066 {
00067 optimize = 1;
00068 warning ("optimization turned on");
00069 retval = 1;
00070 }
00071 else if (strcmp (pname, "CC_OPT_OFF") == 0)
00072 {
00073 optimize = 0;
00074 warning ("optimization turned off");
00075 retval = 1;
00076 }
00077 else if (strcmp (pname, "CC_OPT_RESTORE") == 0)
00078 {
00079 extern int initial_optimize_flag;
00080
00081 if (optimize != initial_optimize_flag)
00082 optimize = initial_optimize_flag;
00083 warning ("optimization level restored");
00084 retval = 1;
00085 }
00086 else if (strcmp (pname, "CC_WRITABLE_STRINGS") == 0)
00087 flag_writable_strings = retval = 1;
00088 else if (strcmp (pname, "CC_NON_WRITABLE_STRINGS") == 0)
00089 flag_writable_strings = 0, retval = 1;
00090 else if (strcmp (pname, "CC_NO_MACH_TEXT_SECTIONS") == 0)
00091 flag_no_mach_text_sections = retval = 1;
00092
00093 return retval;
00094 }
00095
00096 void
00097 nextstep_asm_out_constructor (symbol, priority)
00098 rtx symbol;
00099 int priority ATTRIBUTE_UNUSED;
00100 {
00101 constructor_section ();
00102 assemble_align (POINTER_SIZE);
00103 assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
00104 fprintf (asm_out_file, ".reference .constructors_used\n");
00105 }
00106
00107 void
00108 nextstep_asm_out_destructor (symbol, priority)
00109 rtx symbol;
00110 int priority ATTRIBUTE_UNUSED;
00111 {
00112 destructor_section ();
00113 assemble_align (POINTER_SIZE);
00114 assemble_integer (symbol, POINTER_SIZE / BITS_PER_UNIT, POINTER_SIZE, 1);
00115 fprintf (asm_out_file, ".reference .destructors_used\n");
00116 }
00117