|
|
1.1 root 1: /* Output variables, constants and external declarations, for GNU compiler.
2: Copyright (C) 1988 Free Software Foundation, Inc.
3:
4: This file is part of GNU CC.
5:
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 1, or (at your option)
9: any later version.
10:
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.
15:
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, 675 Mass Ave, Cambridge, MA 02139, USA. */
19:
1.1.1.2 ! root 20: #define NO_EXTERNAL_INDIRECT_ADDRESS /* Alter some macro definitions. */
1.1 root 21: #include "tm-vax.h"
22:
23: #undef CPP_PREDEFINES
24: #undef TARGET_VERSION
25: #undef TARGET_DEFAULT
26: #undef CALL_USED_REGISTERS
27: #undef MAYBE_VMS_FUNCTION_PROLOGUE
28:
29: /* Predefine this in CPP because VMS limits the size of command options
30: and GNU CPP is not used on VMS except with GNU C. */
31: #define CPP_PREDEFINES "-Dvax -Dvms -DVMS -D__GNU__ -D__GNUC__"
32:
33: /* By default, allow $ to be part of an identifier. */
34: #define DOLLARS_IN_IDENTIFIERS 1
35:
36: #define TARGET_DEFAULT 1
37: #define TARGET_VERSION fprintf (stderr, " (vax vms)");
38:
39: #define CALL_USED_REGISTERS {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1}
40:
1.1.1.2 ! root 41: #define __MAIN_NAME " main ("
! 42: /*
! 43: * The MAYBE_VMS_FUNCTION_PROLOGUE macro works for both gcc and g++. It
! 44: * first checks to see if the current routine is "main", which will only
! 45: * happen for GCC, and add the jsb if it is. If is not the case then try and
! 46: * see if __MAIN_NAME is part of current_function_name, which will only happen
! 47: * if we are running g++, and add the jsb if it is. In gcc there should never
! 48: * be a space in the function name, and in g++ there is always a "(" in the
! 49: * function name, thus there should never be any confusion.
! 50: */
1.1 root 51: #define MAYBE_VMS_FUNCTION_PROLOGUE(FILE) \
52: { extern char *current_function_name; \
53: if (!strcmp ("main", current_function_name)) \
1.1.1.2 ! root 54: fprintf(FILE, "\tjsb _c$main_args\n"); \
! 55: else { \
! 56: char *p = current_function_name; \
! 57: while (*p != '\0') \
! 58: if (*p == *__MAIN_NAME) \
! 59: if (strncmp(p, __MAIN_NAME, (sizeof __MAIN_NAME)-1) == 0) {\
! 60: fprintf(FILE, "\tjsb _c$main_args\n");\
! 61: break; \
! 62: } else \
! 63: p++; \
! 64: else \
! 65: p++; \
! 66: }; \
! 67: }
1.1 root 68:
69: #define ASM_OUTPUT_EXTERNAL(FILE,DECL,NAME) \
70: { if (DECL_INITIAL (DECL) == 0 && TREE_CODE (DECL) != FUNCTION_DECL) \
1.1.1.2 ! root 71: { \
! 72: if (TREE_READONLY (decl) && ! TREE_VOLATILE (decl)) \
! 73: const_section (); \
! 74: else \
! 75: data_section (); \
! 76: fputs (".comm ", (FILE)); \
! 77: assemble_name ((FILE), (NAME)); \
! 78: fprintf ((FILE), ",0\n"); \
! 79: } \
! 80: }
! 81:
! 82: #define NO_DOLLAR_IN_LABEL
! 83:
! 84: #define EXTRA_SECTIONS in_const
! 85:
! 86: #define EXTRA_SECTION_FUNCTIONS \
! 87: const_section () \
! 88: { \
! 89: if (in_section != in_const) { \
! 90: fprintf(asm_out_file,".const\n"); \
! 91: in_section = in_const; \
! 92: } \
! 93: }
! 94:
! 95: #define SELECT_SECTION(T) \
! 96: { \
! 97: if (TREE_CODE (T) == VAR_DECL) \
! 98: { \
! 99: if (TREE_READONLY (T) && ! TREE_VOLATILE (T)) \
! 100: { \
! 101: if (TREE_PUBLIC (T)) \
! 102: const_section (); \
! 103: else \
! 104: text_section (); \
! 105: } \
! 106: else \
! 107: data_section (); \
! 108: } \
! 109: if (*tree_code_type[(int) TREE_CODE (T)] == 'c') \
! 110: { \
! 111: if ((TREE_CODE (T) == STRING_CST && flag_writable_strings)) \
! 112: data_section (); \
! 113: else \
! 114: text_section (); \
! 115: } \
! 116: }
! 117:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.