1 /* Bytecode definitions for GNU C-compiler.
2 Copyright (C) 1993 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)
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, 675 Mass Ave, Cambridge, MA 02139, USA. */
20 /* These should come from genemit */
21 typedef signed char QItype;
22 typedef unsigned char QUtype;
23 typedef signed short int HItype;
24 typedef unsigned short int HUtype;
25 typedef signed long int SItype;
26 typedef unsigned long int SUtype;
27 typedef signed long long int DItype;
28 typedef unsigned long long int DUtype;
30 typedef double DFtype;
31 typedef long double XFtype;
35 extern int output_bytecode;
36 extern int stack_depth;
37 extern int max_stack_depth;
39 /* Emit DI constant according to target machine word ordering */
41 #ifdef WORD_HIGH_ENDIAN
43 #define bc_emit_bytecode_DI_const(CST) \
45 opcode = TREE_INT_CST_HIGH (CST); \
46 bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \
47 opcode = TREE_INT_CST_LOW (CST); \
48 bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \
53 #define bc_emit_bytecode_DI_const(CST) \
55 opcode = TREE_INT_CST_LOW (CST); \
56 bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \
57 opcode = TREE_INT_CST_HIGH (CST); \
58 bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \
64 extern void bc_expand_expr ();
65 extern void bc_output_data_constructor ();
66 extern void bc_store_field ();
67 extern void bc_load_bit_field ();
68 extern void bc_store_bit_field ();
69 extern void bc_push_offset_and_size ();
70 extern void bc_init_mode_to_code_map ();
72 /* These are just stubs, so the compiler will compile for targets
73 that aren't yet supported by the bytecode generator. */
75 #ifndef TARGET_SUPPORTS_BYTECODE
77 #define MACHINE_SEG_ALIGN 1
80 #define NAMES_HAVE_UNDERSCORES
82 #define BC_GLOBALIZE_LABEL(FP, NAME) BC_NOP
83 #define BC_OUTPUT_COMMON(FP, NAME, SIZE, ROUNDED) BC_NOP
84 #define BC_OUTPUT_LOCAL(FP, NAME, SIZE, ROUNDED) BC_NOP
85 #define BC_OUTPUT_ALIGN(FP, ALIGN) BC_NOP
86 #define BC_OUTPUT_LABEL(FP, NAME) BC_NOP
87 #define BC_OUTPUT_SKIP(FP, SIZE) BC_NOP
88 #define BC_OUTPUT_LABELREF(FP, NAME) BC_NOP
89 #define BC_OUTPUT_FLOAT(FP, VAL) BC_NOP
90 #define BC_OUTPUT_DOUBLE(FP, VAL) BC_NOP
91 #define BC_OUTPUT_BYTE(FP, VAL) BC_NOP
92 #define BC_OUTPUT_FILE ASM_OUTPUT_FILE
93 #define BC_OUTPUT_ASCII ASM_OUTPUT_ASCII
94 #define BC_OUTPUT_IDENT ASM_OUTPUT_IDENT
95 #define BCXSTR(RTX) ((RTX)->bc_label)
96 #define BC_WRITE_FILE(FP) BC_NOP
97 #define BC_WRITE_SEGSYM(SEGSYM, FP) BC_NOP
98 #define BC_WRITE_RELOC_ENTRY(SEGRELOC, FP, OFFSET) BC_NOP
99 #define BC_START_BYTECODE_LINE(FP) BC_NOP
100 #define BC_WRITE_BYTECODE(SEP, VAL, FP) BC_NOP
101 #define BC_WRITE_RTL(R, FP) BC_NOP
102 #define BC_EMIT_TRAMPOLINE(TRAMPSEG, CALLINFO) BC_NOP
103 #define VALIDATE_STACK BC_NOP
105 #endif /* !TARGET_SUPPORTS_BYTECODE */