1AC_MSG_CHECKING([for sim ppc bitsize settings]) 2AC_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");; 7esac], [sim_ppc_bitsize=""]) 8AC_MSG_RESULT($sim_ppc_bitsize) 9 10AC_MSG_CHECKING([for sim ppc decode mechanism]) 11AC_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");; 17esac], [sim_ppc_decode_mechanism=""]) 18AC_MSG_RESULT($sim_ppc_decode_mechanism) 19 20AC_MSG_CHECKING([for sim ppc default model]) 21AC_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}";; 26esac], [sim_ppc_default_model=""]) 27AC_MSG_RESULT($sim_ppc_default_model) 28 29AC_MSG_CHECKING([for sim ppc duplicate settings]) 30AC_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";; 34 no) sim_ppc_dup="";; 35 *) AC_MSG_ERROR("--enable-sim-ppc-duplicate does not take a value");; 36esac], [sim_ppc_dup="-E"]) 37AC_MSG_RESULT($sim_ppc_dup) 38 39AC_MSG_CHECKING([for sim ppc filter rules]) 40AC_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";; 46esac], [sim_ppc_filter="-F 32,f,o"]) 47AC_MSG_RESULT($sim_ppc_filter) 48 49AC_MSG_CHECKING([for sim ppc float settings]) 50AC_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");; 58esac], 59[case "${target}" in 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" ;; 62 *) sim_ppc_float="" 63esac]) 64AC_MSG_RESULT($sim_ppc_float) 65 66AC_MSG_CHECKING([for sim ppc hardware settings]) 67hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm" 68AC_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 71 yes) ;; 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}"'';; 76esac]) 77sim_ppc_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'` 78sim_ppc_hw_obj=`echo $sim_ppc_hw_src | sed -e 's/\.c/.o/g'` 79AC_MSG_RESULT($hardware) 80 81AC_MSG_CHECKING([for sim ppc icache settings]) 82AC_ARG_ENABLE(sim-ppc-icache, 83[AS_HELP_STRING([--enable-sim-ppc-icache=size], [Specify instruction-decode cache size and type.])], 84[icache="-R" 85 case "${enableval}" in 86 yes) icache="1024"; sim_ppc_icache="-I $icache";; 87 no) sim_ppc_icache="-R";; 88 *) icache=1024 89 sim_ppc_icache="-" 90 for x in `echo "${enableval}" | sed -e "s/,/ /g"`; do 91 case "$x" in 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");; 97 esac 98 done 99 sim_ppc_icache="${sim_ppc_icache}I $icache";; 100esac], [sim_ppc_icache="-CSRI 1024"]) 101AC_MSG_RESULT($sim_ppc_icache) 102 103AC_MSG_CHECKING([for sim ppc jump settings]) 104AC_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");; 110esac], [sim_ppc_jump=""]) 111AC_MSG_RESULT($sim_ppc_jump) 112 113AC_MSG_CHECKING([for sim ppc source debug line numbers]) 114AC_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");; 120esac], [sim_ppc_line_nr=""]) 121AC_MSG_RESULT($sim_ppc_line_nr) 122 123AC_MSG_CHECKING([for sim ppc model]) 124AC_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}";; 129esac], [sim_ppc_model=""]) 130AC_MSG_RESULT($sim_ppc_model) 131 132AC_MSG_CHECKING([for sim ppc model issue]) 133AC_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");; 139esac], [sim_ppc_model_issue=""]) 140AC_MSG_RESULT($sim_ppc_model_issue) 141 142AC_MSG_CHECKING([for sim ppc event monitoring]) 143AC_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");; 151esac], [sim_ppc_monitor=""]) 152AC_MSG_RESULT($sim_ppc_monitor) 153 154AC_MSG_CHECKING([for sim ppc opcode lookup settings]) 155AC_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}" 163 else 164 AC_MSG_ERROR("File $enableval is not an opcode rules file") 165 fi;; 166esac], [sim_ppc_opcode="dc-complex"]) 167AC_MSG_RESULT($sim_ppc_opcode) 168 169AC_MSG_CHECKING([for sim ppc smp settings]) 170AC_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";; 176esac], [sim_ppc_smp="-DWITH_SMP=5" ; sim_ppc_igen_smp="-N 5"]) 177AC_MSG_RESULT($sim_ppc_smp) 178 179AC_MSG_CHECKING([for sim ppc switch table settings]) 180AC_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");; 186esac], [sim_ppc_switch=""]) 187AC_MSG_RESULT($sim_ppc_switch) 188 189AC_MSG_CHECKING([for sim ppc timebase]) 190AC_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");; 196esac], [sim_ppc_timebase=""]) 197AC_MSG_RESULT($sim_ppc_timebase) 198 199AC_MSG_CHECKING([for sim ppc xor endian settings]) 200AC_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";; 206esac], [sim_ppc_xor_endian=""]) 207AC_MSG_RESULT($sim_ppc_xor_endian) 208 209AC_SUBST(sim_ppc_line_nr) 210AC_SUBST(sim_ppc_opcode) 211AC_SUBST(sim_ppc_switch) 212AC_SUBST(sim_ppc_dup) 213AC_SUBST(sim_ppc_decode_mechanism) 214AC_SUBST(sim_ppc_jump) 215AC_SUBST(sim_ppc_filter) 216AC_SUBST(sim_ppc_icache) 217AC_SUBST(sim_ppc_hw_src) 218AC_SUBST(sim_ppc_hw_obj) 219AC_SUBST(sim_ppc_xor_endian) 220AC_SUBST(sim_ppc_smp) 221AC_SUBST(sim_ppc_igen_smp) 222AC_SUBST(sim_ppc_bitsize) 223AC_SUBST(sim_ppc_timebase) 224AC_SUBST(sim_ppc_float) 225AC_SUBST(sim_ppc_monitor) 226AC_SUBST(sim_ppc_model) 227AC_SUBST(sim_ppc_default_model) 228AC_SUBST(sim_ppc_model_issue) 229