OSDN Git Service

91th Cygnus<->FSF merge
[pf3gnuchains/gcc-fork.git] / gcc / bytecode.h
1 /* Bytecode definitions for GNU C-compiler.
2    Copyright (C) 1993, 1994, 1996 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 2, 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, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21
22 extern int output_bytecode;
23 extern int stack_depth;
24 extern int max_stack_depth;
25
26 /* Emit DI constant according to target machine word ordering */
27
28 #define bc_emit_bytecode_DI_const(CST)                          \
29 { int opcode;                                                   \
30   opcode = (WORDS_BIG_ENDIAN                                    \
31             ? TREE_INT_CST_HIGH (CST)                           \
32             : TREE_INT_CST_LOW (CST));                          \
33   bc_emit_bytecode_const ((char *) &opcode, sizeof opcode);     \
34   opcode = (WORDS_BIG_ENDIAN                                    \
35             ? TREE_INT_CST_LOW (CST)                            \
36             : TREE_INT_CST_HIGH (CST));                         \
37   bc_emit_bytecode_const ((char *) &opcode, sizeof opcode);     \
38 }
39
40 extern void bc_expand_expr ();
41 extern void bc_output_data_constructor ();
42 extern void bc_store_field ();
43 extern void bc_load_bit_field ();
44 extern void bc_store_bit_field ();
45 extern void bc_push_offset_and_size ();
46 extern void bc_init_mode_to_code_map ();
47
48 /* These are just stubs, so the compiler will compile for targets
49    that aren't yet supported by the bytecode generator. */
50
51 #ifndef TARGET_SUPPORTS_BYTECODE
52
53 #define MACHINE_SEG_ALIGN 1
54 #define INT_ALIGN 1
55 #define PTR_ALIGN 1
56 #define NAMES_HAVE_UNDERSCORES
57 #define BC_NOP   (0)
58 #define BC_GLOBALIZE_LABEL(FP, NAME) BC_NOP
59 #define BC_OUTPUT_COMMON(FP, NAME, SIZE, ROUNDED) BC_NOP
60 #define BC_OUTPUT_BSS(FP, NAME, SIZE, ROUNDED)    BC_NOP
61 #define BC_OUTPUT_LOCAL(FP, NAME, SIZE, ROUNDED)  BC_NOP
62 #define BC_OUTPUT_ALIGN(FP, ALIGN)   BC_NOP
63 #define BC_OUTPUT_LABEL(FP, NAME)    BC_NOP
64 #define BC_OUTPUT_SKIP(FP, SIZE)     BC_NOP
65 #define BC_OUTPUT_LABELREF(FP, NAME) BC_NOP
66 #define BC_OUTPUT_FLOAT(FP, VAL)     BC_NOP
67 #define BC_OUTPUT_DOUBLE(FP, VAL)    BC_NOP
68 #define BC_OUTPUT_BYTE(FP, VAL)      BC_NOP
69 #define BC_OUTPUT_FILE ASM_OUTPUT_FILE
70 #define BC_OUTPUT_ASCII ASM_OUTPUT_ASCII
71 #define BC_OUTPUT_IDENT ASM_OUTPUT_IDENT
72 #define BCXSTR(RTX)  ((RTX)->bc_label)
73 #define BC_WRITE_FILE(FP)            BC_NOP
74 #define BC_WRITE_SEGSYM(SEGSYM, FP)  BC_NOP
75 #define BC_WRITE_RELOC_ENTRY(SEGRELOC, FP, OFFSET) BC_NOP
76 #define BC_START_BYTECODE_LINE(FP)   BC_NOP
77 #define BC_WRITE_BYTECODE(SEP, VAL, FP) BC_NOP
78 #define BC_WRITE_RTL(R, FP)          BC_NOP
79 #define BC_EMIT_TRAMPOLINE(TRAMPSEG, CALLINFO) BC_NOP
80 #define VALIDATE_STACK               BC_NOP
81
82 #endif /* !TARGET_SUPPORTS_BYTECODE */