OSDN Git Service

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