(*zeroextract[qs]i_compare0_scratch): Use const_int_operand
[official-gcc.git] / gcc / config / nextstep.c
blob65bf16e387ed5358fc1613a2d1e5759bbea06140
1 /* Functions for generic NeXT as target machine for GNU C compiler.
2 Copyright (C) 1989, 90-93, 1996 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* Make everything that used to go in the text section really go there. */
23 int flag_no_mach_text_sections = 0;
25 #define OPT_STRCMP(opt) (!strncmp (opt, p, sizeof (opt)-1))
27 /* 1 if handle_pragma has been called yet. */
29 static int pragma_initialized;
31 /* Initial setting of `optimize'. */
33 static int initial_optimize_flag;
35 extern char *get_directive_line ();
37 /* Called from check_newline via the macro HANDLE_PRAGMA.
38 FINPUT is the source file input stream.
39 CH is the first character after `#pragma'.
40 The result is the terminating character ('\n' or EOF). */
42 int
43 handle_pragma (finput, ch, get_line_function)
44 FILE *finput;
45 int ch;
46 char *(*get_line_function) ();
48 register char *p;
50 /* Record initial setting of optimize flag, so we can restore it. */
51 if (!pragma_initialized)
53 pragma_initialized = 1;
54 initial_optimize_flag = optimize;
57 /* Nothing to do if #pragma is by itself. */
58 if (ch == '\n' || ch == EOF)
59 return ch;
61 p = (*get_line_function) (finput);
62 if (OPT_STRCMP ("CC_OPT_ON"))
64 optimize = 1, obey_regdecls = 0;
65 warning ("optimization turned on");
67 else if (OPT_STRCMP ("CC_OPT_OFF"))
69 optimize = 0, obey_regdecls = 1;
70 warning ("optimization turned off");
72 else if (OPT_STRCMP ("CC_OPT_RESTORE"))
74 extern int initial_optimize_flag;
76 if (optimize != initial_optimize_flag)
78 if (initial_optimize_flag)
79 obey_regdecls = 0;
80 else
81 obey_regdecls = 1;
82 optimize = initial_optimize_flag;
84 warning ("optimization level restored");
86 else if (OPT_STRCMP ("CC_WRITABLE_STRINGS"))
87 flag_writable_strings = 1;
88 else if (OPT_STRCMP ("CC_NON_WRITABLE_STRINGS"))
89 flag_writable_strings = 0;
90 else if (OPT_STRCMP ("CC_NO_MACH_TEXT_SECTIONS"))
91 flag_no_mach_text_sections = 1;
93 /* get_line_function must leave the last character read in FINPUT. */
94 return getc (finput);