1 AC_MSG_CHECKING([for sim ppc bitsize settings])
2 AC_ARG_ENABLE(sim-ppc-bitsize,
3 [AS_HELP_STRING([--enable-sim-ppc-bitsize=n], [Specify target bitsize (32 or 64).])],
4 [case "${enableval}" in
5 32|64) sim_ppc_bitsize="-DWITH_TARGET_WORD_BITSIZE=$enableval";;
6 *) AC_MSG_ERROR("--enable-sim-ppc-bitsize was given $enableval. Expected 32 or 64");;
7 esac], [sim_ppc_bitsize=""])
8 AC_MSG_RESULT($sim_ppc_bitsize)
10 AC_MSG_CHECKING([for sim ppc decode mechanism])
11 AC_ARG_ENABLE(sim-ppc-decode-mechanism,
12 [AS_HELP_STRING([--enable-sim-ppc-decode-mechanism=which], [Specify the instruction decode mechanism.])],
13 [case "${enableval}" in
14 yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-ppc-decode-mechanism=file");;
15 array|switch|padded-switch|goto-switch) sim_ppc_decode_mechanism="-T ${enableval}";;
16 *) AC_MSG_ERROR("File $enableval is not an opcode rules file");;
17 esac], [sim_ppc_decode_mechanism=""])
18 AC_MSG_RESULT($sim_ppc_decode_mechanism)
20 AC_MSG_CHECKING([for sim ppc default model])
21 AC_ARG_ENABLE(sim-ppc-default-model,
22 [AS_HELP_STRING([--enable-sim-ppc-default-model=which], [Specify default PowerPC to model.])],
23 [case "${enableval}" in
24 yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-ppc-default-model=model");;
25 *) sim_ppc_default_model="-DWITH_DEFAULT_MODEL=${enableval}";;
26 esac], [sim_ppc_default_model=""])
27 AC_MSG_RESULT($sim_ppc_default_model)
29 AC_MSG_CHECKING([for sim ppc duplicate settings])
30 AC_ARG_ENABLE(sim-ppc-duplicate,
31 [AS_HELP_STRING([--enable-sim-ppc-duplicate], [Expand (duplicate) semantic functions.])],
32 [case "${enableval}" in
33 yes) sim_ppc_dup="-E";;
35 *) AC_MSG_ERROR("--enable-sim-ppc-duplicate does not take a value");;
36 esac], [sim_ppc_dup="-E"])
37 AC_MSG_RESULT($sim_ppc_dup)
39 AC_MSG_CHECKING([for sim ppc filter rules])
40 AC_ARG_ENABLE(sim-ppc-filter,
41 [AS_HELP_STRING([--enable-sim-ppc-filter=rule], [Specify filter rules.])],
42 [case "${enableval}" in
43 yes) AC_MSG_ERROR("--enable-sim-ppc-filter must be specified with a rule to filter or no");;
44 no) sim_ppc_filter="";;
45 *) sim_ppc_filter="-F $enableval";;
46 esac], [sim_ppc_filter="-F 32,f,o"])
47 AC_MSG_RESULT($sim_ppc_filter)
49 AC_MSG_CHECKING([for sim ppc float settings])
50 AC_ARG_ENABLE(sim-ppc-float,
51 [AS_HELP_STRING([--enable-sim-ppc-float], [Specify whether the target has hard, soft, altivec or e500 floating point.])],
52 [case "${enableval}" in
53 yes | hard) sim_ppc_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
54 no | soft) sim_ppc_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
55 altivec) sim_ppc_float="-DWITH_ALTIVEC" ; sim_ppc_filter="${sim_ppc_filter},av" ;;
56 *spe*|*simd*) sim_ppc_float="-DWITH_E500" ; sim_ppc_filter="${sim_ppc_filter},e500" ;;
57 *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-ppc-float");;
60 *altivec*) sim_ppc_float="-DWITH_ALTIVEC" ; sim_ppc_filter="${sim_ppc_filter},av" ;;
61 *spe*|*simd*) sim_ppc_float="-DWITH_E500" ; sim_ppc_filter="${sim_ppc_filter},e500" ;;
64 AC_MSG_RESULT($sim_ppc_float)
66 AC_MSG_CHECKING([for sim ppc hardware settings])
67 hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm"
68 AC_ARG_ENABLE(sim-ppc-hardware,
69 [AS_HELP_STRING([--enable-sim-ppc-hardware=list], [Specify the hardware to be included in the build.])],
70 [case "${enableval}" in
72 no) AC_MSG_ERROR("List of hardware must be specified for --enable-sim-ppc-hardware");;
73 ,*) hardware="${hardware}${enableval}";;
74 *,) hardware="${enableval}${hardware}";;
75 *) hardware="${enableval}"'';;
77 sim_ppc_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
78 sim_ppc_hw_obj=`echo $sim_ppc_hw_src | sed -e 's/\.c/.o/g'`
79 AC_MSG_RESULT($hardware)
81 AC_MSG_CHECKING([for sim ppc icache settings])
82 AC_ARG_ENABLE(sim-ppc-icache,
83 [AS_HELP_STRING([--enable-sim-ppc-icache=size], [Specify instruction-decode cache size and type.])],
85 case "${enableval}" in
86 yes) icache="1024"; sim_ppc_icache="-I $icache";;
87 no) sim_ppc_icache="-R";;
90 for x in `echo "${enableval}" | sed -e "s/,/ /g"`; do
92 define) sim_ppc_icache="${sim_ppc_icache}R";;
93 semantic) sim_ppc_icache="${sim_ppc_icache}C";;
94 insn) sim_ppc_icache="${sim_ppc_icache}S";;
95 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) icache=$x;;
96 *) AC_MSG_ERROR("Unknown value $x for --enable-sim-ppc-icache");;
99 sim_ppc_icache="${sim_ppc_icache}I $icache";;
100 esac], [sim_ppc_icache="-CSRI 1024"])
101 AC_MSG_RESULT($sim_ppc_icache)
103 AC_MSG_CHECKING([for sim ppc jump settings])
104 AC_ARG_ENABLE(sim-ppc-jump,
105 [AS_HELP_STRING([--enable-sim-ppc-jump], [Jump between semantic code (instead of call/return).])],
106 [case "${enableval}" in
107 yes) sim_ppc_jump="-J";;
108 no) sim_ppc_jump="";;
109 *) AC_MSG_ERROR("--enable-sim-ppc-jump does not take a value");;
110 esac], [sim_ppc_jump=""])
111 AC_MSG_RESULT($sim_ppc_jump)
113 AC_MSG_CHECKING([for sim ppc source debug line numbers])
114 AC_ARG_ENABLE(sim-ppc-line-nr,
115 [AS_HELP_STRING([--enable-sim-ppc-line-nr=opts], [Generate extra CPP code that references source rather than generated code])],
116 [case "${enableval}" in
117 yes) sim_ppc_line_nr="";;
118 no) sim_ppc_line_nr="-L";;
119 *) AC_MSG_ERROR("--enable-sim-ppc-line-nr does not take a value");;
120 esac], [sim_ppc_line_nr=""])
121 AC_MSG_RESULT($sim_ppc_line_nr)
123 AC_MSG_CHECKING([for sim ppc model])
124 AC_ARG_ENABLE(sim-ppc-model,
125 [AS_HELP_STRING([--enable-sim-ppc-model=which], [Specify PowerPC to model.])],
126 [case "${enableval}" in
127 yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-ppc-model=model");;
128 *) sim_ppc_model="-DWITH_MODEL=${enableval}";;
129 esac], [sim_ppc_model=""])
130 AC_MSG_RESULT($sim_ppc_model)
132 AC_MSG_CHECKING([for sim ppc model issue])
133 AC_ARG_ENABLE(sim-ppc-model-issue,
134 [AS_HELP_STRING([--enable-sim-ppc-model-issue], [Specify whether to simulate model specific actions])],
135 [case "${enableval}" in
136 yes) sim_ppc_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_PROCESS";;
137 no) sim_ppc_model_issue="-DWITH_MODEL_ISSUE=MODEL_ISSUE_IGNORE";;
138 *) AC_MSG_ERROR("--enable-sim-ppc-model-issue does not take a value");;
139 esac], [sim_ppc_model_issue=""])
140 AC_MSG_RESULT($sim_ppc_model_issue)
142 AC_MSG_CHECKING([for sim ppc event monitoring])
143 AC_ARG_ENABLE(sim-ppc-monitor,
144 [AS_HELP_STRING([--enable-sim-ppc-monitor=mon], [Specify whether to enable monitoring events.])],
145 [case "${enableval}" in
146 yes) sim_ppc_monitor="-DWITH_MON='MONITOR_INSTRUCTION_ISSUE | MONITOR_LOAD_STORE_UNIT'";;
147 no) sim_ppc_monitor="-DWITH_MON=0";;
148 instruction) sim_ppc_monitor="-DWITH_MON=MONITOR_INSTRUCTION_ISSUE";;
149 memory) sim_ppc_monitor="-DWITH_MON=MONITOR_LOAD_STORE_UNIT";;
150 *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-ppc-mon");;
151 esac], [sim_ppc_monitor=""])
152 AC_MSG_RESULT($sim_ppc_monitor)
154 AC_MSG_CHECKING([for sim ppc opcode lookup settings])
155 AC_ARG_ENABLE(sim-ppc-opcode,
156 [AS_HELP_STRING([--enable-sim-ppc-opcode=which], [Override default opcode lookup.])],
157 [case "${enableval}" in
158 yes|no) AC_MSG_ERROR("No value supplied for --enable-sim-ppc-opcode=file");;
159 *) if test -f "${srcdir}/${enableval}"; then
160 sim_ppc_opcode="${enableval}"
161 elif test -f "${srcdir}/dc-${enableval}"; then
162 sim_ppc_opcode="dc-${enableval}"
164 AC_MSG_ERROR("File $enableval is not an opcode rules file")
166 esac], [sim_ppc_opcode="dc-complex"])
167 AC_MSG_RESULT($sim_ppc_opcode)
169 AC_MSG_CHECKING([for sim ppc smp settings])
170 AC_ARG_ENABLE(sim-ppc-smp,
171 [AS_HELP_STRING([--enable-sim-ppc-smp=n], [Specify number of processors to configure for.])],
172 [case "${enableval}" in
173 yes) sim_ppc_smp="-DWITH_SMP=5" ; sim_ppc_igen_smp="-N 5";;
174 no) sim_ppc_smp="-DWITH_SMP=0" ; sim_ppc_igen_smp="-N 0";;
175 *) sim_ppc_smp="-DWITH_SMP=$enableval" ; sim_ppc_igen_smp="-N $enableval";;
176 esac], [sim_ppc_smp="-DWITH_SMP=5" ; sim_ppc_igen_smp="-N 5"])
177 AC_MSG_RESULT($sim_ppc_smp)
179 AC_MSG_CHECKING([for sim ppc switch table settings])
180 AC_ARG_ENABLE(sim-ppc-switch,
181 [AS_HELP_STRING([--enable-sim-ppc-switch], [Use a switch instead of a table for instruction call.])],
182 [case "${enableval}" in
183 yes) sim_ppc_switch="-DWITH_SPREG_SWITCH_TABLE";;
184 no) sim_ppc_switch="";;
185 *) AC_MSG_ERROR("--enable-sim-ppc-switch does not take a value");;
186 esac], [sim_ppc_switch=""])
187 AC_MSG_RESULT($sim_ppc_switch)
189 AC_MSG_CHECKING([for sim ppc timebase])
190 AC_ARG_ENABLE(sim-ppc-timebase,
191 [AS_HELP_STRING([--enable-sim-ppc-timebase], [Specify whether the PPC timebase is supported.])],
192 [case "${enableval}" in
193 yes) sim_ppc_timebase="-DWITH_TIME_BASE=1";;
194 no) sim_ppc_timebase="-DWITH_TIME_BASE=0";;
195 *) AC_MSG_ERROR("--enable-sim-ppc-timebase does not take a value");;
196 esac], [sim_ppc_timebase=""])
197 AC_MSG_RESULT($sim_ppc_timebase)
199 AC_MSG_CHECKING([for sim ppc xor endian settings])
200 AC_ARG_ENABLE(sim-ppc-xor-endian,
201 [AS_HELP_STRING([--enable-sim-ppc-xor-endian=n], [Specify number bytes involved in PowerPC XOR bi-endian mode (default 8).])],
202 [case "${enableval}" in
203 yes) sim_ppc_xor_endian="-DWITH_XOR_ENDIAN=8";;
204 no) sim_ppc_xor_endian="-DWITH_XOR_ENDIAN=0";;
205 *) sim_ppc_xor_endian="-DWITH_XOR_ENDIAN=$enableval";;
206 esac], [sim_ppc_xor_endian=""])
207 AC_MSG_RESULT($sim_ppc_xor_endian)
209 AC_SUBST(sim_ppc_line_nr)
210 AC_SUBST(sim_ppc_opcode)
211 AC_SUBST(sim_ppc_switch)
212 AC_SUBST(sim_ppc_dup)
213 AC_SUBST(sim_ppc_decode_mechanism)
214 AC_SUBST(sim_ppc_jump)
215 AC_SUBST(sim_ppc_filter)
216 AC_SUBST(sim_ppc_icache)
217 AC_SUBST(sim_ppc_hw_src)
218 AC_SUBST(sim_ppc_hw_obj)
219 AC_SUBST(sim_ppc_xor_endian)
220 AC_SUBST(sim_ppc_smp)
221 AC_SUBST(sim_ppc_igen_smp)
222 AC_SUBST(sim_ppc_bitsize)
223 AC_SUBST(sim_ppc_timebase)
224 AC_SUBST(sim_ppc_float)
225 AC_SUBST(sim_ppc_monitor)
226 AC_SUBST(sim_ppc_model)
227 AC_SUBST(sim_ppc_default_model)
228 AC_SUBST(sim_ppc_model_issue)