Commit | Line | Data |
---|---|---|
c5addc19 MM |
1 | /* This file is part of the program psim. |
2 | ||
3 | Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au> | |
4 | ||
5 | This program is free software; you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 2 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
16 | along with this program; if not, write to the Free Software | |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
18 | ||
19 | */ | |
20 | ||
21 | #ifndef _OPTIONS_C_ | |
22 | #define _OPTIONS_C_ | |
23 | ||
28816f45 | 24 | #include "cpu.h" |
c5addc19 MM |
25 | #include "options.h" |
26 | ||
27 | STATIC_INLINE const char * | |
28 | options_byte_order (int order) | |
29 | { | |
30 | switch (order) { | |
31 | case 0: return "0"; | |
32 | case BIG_ENDIAN: return "BIG_ENDIAN"; | |
33 | case LITTLE_ENDIAN: return "LITTLE_ENDIAN"; | |
34 | } | |
35 | ||
36 | return "UNKNOWN"; | |
37 | } | |
38 | ||
39 | STATIC_INLINE const char * | |
40 | options_env (int env) | |
41 | { | |
42 | switch (env) { | |
43 | case OPERATING_ENVIRONMENT: return "OPERATING"; | |
44 | case VIRTUAL_ENVIRONMENT: return "VIRTUAL"; | |
45 | case USER_ENVIRONMENT: return "USER"; | |
ba62bb1c | 46 | case 0: return "0"; |
c5addc19 MM |
47 | } |
48 | ||
49 | return "UNKNOWN"; | |
50 | } | |
51 | ||
52 | STATIC_INLINE const char * | |
53 | options_align (int align) | |
54 | { | |
55 | switch (align) { | |
56 | case NONSTRICT_ALIGNMENT: return "NONSTRICT"; | |
57 | case STRICT_ALIGNMENT: return "STRICT"; | |
58 | case 0: return "0"; | |
59 | } | |
60 | ||
61 | return "UNKNOWN"; | |
62 | } | |
63 | ||
64 | STATIC_INLINE const char * | |
65 | options_float (int float_type) | |
66 | { | |
67 | switch (float_type) { | |
68 | case SOFT_FLOATING_POINT: return "SOFTWARE"; | |
69 | case HARD_FLOATING_POINT: return "HARDWARE"; | |
70 | } | |
71 | ||
72 | return "UNKNOWN"; | |
73 | } | |
74 | ||
75 | STATIC_INLINE const char * | |
76 | options_mon (int mon) | |
77 | { | |
78 | switch (mon) { | |
79 | case MONITOR_INSTRUCTION_ISSUE|MONITOR_LOAD_STORE_UNIT: return "ALL"; | |
80 | case MONITOR_INSTRUCTION_ISSUE: return "INSTRUCTION"; | |
81 | case MONITOR_LOAD_STORE_UNIT: return "MEMORY"; | |
82 | case 0: return "0"; | |
83 | } | |
84 | ||
85 | return "UNKNOWN"; | |
86 | } | |
87 | ||
acb06d30 | 88 | INLINE_OPTIONS void |
c5addc19 MM |
89 | print_options (void) |
90 | { | |
ba62bb1c MM |
91 | #if defined(_GNUC_) && defined(__VERSION__) |
92 | printf_filtered ("Compiled by GCC %s on %s %s\n", __VERSION__, __DATE__, __TIME__); | |
93 | #else | |
94 | printf_filtered ("Compiled on %s %s\n", __DATE__, __TIME__); | |
95 | #endif | |
96 | ||
c5addc19 MM |
97 | printf_filtered ("WITH_HOST_BYTE_ORDER = %s\n", options_byte_order (WITH_HOST_BYTE_ORDER)); |
98 | printf_filtered ("WITH_TARGET_BYTE_ORDER = %s\n", options_byte_order (WITH_TARGET_BYTE_ORDER)); | |
acb06d30 | 99 | printf_filtered ("WITH_XOR_ENDIAN = %d\n", WITH_XOR_ENDIAN); |
c5addc19 MM |
100 | printf_filtered ("WITH_BSWAP = %d\n", WITH_BSWAP); |
101 | printf_filtered ("WITH_SMP = %d\n", WITH_SMP); | |
102 | printf_filtered ("WITH_HOST_WORD_BITSIZE = %d\n", WITH_HOST_WORD_BITSIZE); | |
103 | printf_filtered ("WITH_TARGET_WORD_BITSIZE = %d\n", WITH_TARGET_WORD_BITSIZE); | |
104 | printf_filtered ("WITH_ENVIRONMENT = %s\n", options_env(WITH_ENVIRONMENT)); | |
105 | printf_filtered ("WITH_EVENTS = %d\n", WITH_EVENTS); | |
106 | printf_filtered ("WITH_TIME_BASE = %d\n", WITH_TIME_BASE); | |
107 | printf_filtered ("WITH_CALLBACK_MEMORY = %d\n", WITH_CALLBACK_MEMORY); | |
108 | printf_filtered ("WITH_ALIGNMENT = %s\n", options_align (WITH_ALIGNMENT)); | |
109 | printf_filtered ("WITH_FLOATING_POINT = %s\n", options_float (WITH_FLOATING_POINT)); | |
110 | printf_filtered ("WITH_TRACE = %d\n", WITH_TRACE); | |
111 | printf_filtered ("WITH_ASSERT = %d\n", WITH_ASSERT); | |
112 | printf_filtered ("WITH_MON = %s\n", options_mon (WITH_MON)); | |
113 | printf_filtered ("WITH_FUNCTION_UNIT = %d\n", WITH_FUNCTION_UNIT); | |
28816f45 MM |
114 | printf_filtered ("WITH_DEFAULT_MODEL = %s\n", model_name[WITH_DEFAULT_MODEL]); |
115 | printf_filtered ("WITH_MODEL = %s\n", model_name[WITH_MODEL]); | |
116 | printf_filtered ("WITH_RESERVED_BITS = %d\n", WITH_RESERVED_BITS); | |
c5addc19 MM |
117 | printf_filtered ("DEFAULT_INLINE = %d\n", DEFAULT_INLINE); |
118 | printf_filtered ("SIM_ENDIAN_INLINE = %d\n", SIM_ENDIAN_INLINE); | |
119 | printf_filtered ("BITS_INLINE = %d\n", BITS_INLINE); | |
120 | printf_filtered ("CPU_INLINE = %d\n", CPU_INLINE); | |
121 | printf_filtered ("VM_INLINE = %d\n", VM_INLINE); | |
122 | printf_filtered ("CORE_INLINE = %d\n", CORE_INLINE); | |
123 | printf_filtered ("EVENTS_INLINE = %d\n", EVENTS_INLINE); | |
124 | printf_filtered ("MON_INLINE = %d\n", MON_INLINE); | |
125 | printf_filtered ("INTERRUPTS_INLINE = %d\n", INTERRUPTS_INLINE); | |
126 | printf_filtered ("REGISTERS_INLINE = %d\n", REGISTERS_INLINE); | |
127 | printf_filtered ("DEVICE_TREE_INLINE = %d\n", DEVICE_TREE_INLINE); | |
128 | printf_filtered ("DEVICES_INLINE = %d\n", DEVICES_INLINE); | |
129 | printf_filtered ("SPREG_INLINE = %d\n", SPREG_INLINE); | |
130 | printf_filtered ("SEMANTICS_INLINE = %d\n", SEMANTICS_INLINE); | |
131 | printf_filtered ("IDECODE_INLINE = %d\n", IDECODE_INLINE); | |
132 | printf_filtered ("FUNCTION_UNIT_INLINE = %d\n", FUNCTION_UNIT_INLINE); | |
acb06d30 | 133 | printf_filtered ("OPTIONS_INLINE = %d\n", FUNCTION_UNIT_INLINE); |
ba62bb1c MM |
134 | |
135 | #ifdef OPCODE_RULES | |
136 | printf_filtered ("OPCODE rules = %s\n", OPCODE_RULES); | |
137 | #endif | |
138 | ||
139 | #ifdef IGEN_FLAGS | |
140 | printf_filtered ("IGEN_FLAGS = %s\n", IGEN_FLAGS); | |
141 | #endif | |
142 | ||
143 | #ifdef DGEN_FLAGS | |
144 | printf_filtered ("DGEN_FLAGS = %s\n", DGEN_FLAGS); | |
145 | #endif | |
c5addc19 MM |
146 | } |
147 | ||
148 | #endif /* _OPTIONS_C_ */ |