SConscript revision 9919
12623SN/A# -*- mode:python -*- 22623SN/A 32623SN/A# Copyright (c) 2007-2008 The Hewlett-Packard Development Company 42623SN/A# All rights reserved. 52623SN/A# 62623SN/A# The license below extends only to copyright in the software and shall 72623SN/A# not be construed as granting a license to any other intellectual 82623SN/A# property including but not limited to intellectual property relating 92623SN/A# to a hardware implementation of the functionality of the software 102623SN/A# licensed hereunder. You may use the software subject to the license 112623SN/A# terms below provided that you ensure that this notice is replicated 122623SN/A# unmodified and in its entirety in all distributions of the software, 132623SN/A# modified or unmodified, in source code or in binary form. 142623SN/A# 152623SN/A# Copyright (c) 2005-2006 The Regents of The University of Michigan 162623SN/A# All rights reserved. 172623SN/A# 182623SN/A# Redistribution and use in source and binary forms, with or without 192623SN/A# modification, are permitted provided that the following conditions are 202623SN/A# met: redistributions of source code must retain the above copyright 212623SN/A# notice, this list of conditions and the following disclaimer; 222623SN/A# redistributions in binary form must reproduce the above copyright 232623SN/A# notice, this list of conditions and the following disclaimer in the 242623SN/A# documentation and/or other materials provided with the distribution; 252623SN/A# neither the name of the copyright holders nor the names of its 262623SN/A# contributors may be used to endorse or promote products derived from 272665Ssaidi@eecs.umich.edu# this software without specific prior written permission. 282665Ssaidi@eecs.umich.edu# 292623SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 302623SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 312623SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 322623SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 332623SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 342623SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 352623SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 362623SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 372623SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 382623SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 392623SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 402623SN/A# 412623SN/A# Authors: Gabe Black 422623SN/A 432623SN/AImport('*') 442623SN/A 452623SN/Aif env['TARGET_ISA'] == 'x86': 462623SN/A Source('cpuid.cc') 472623SN/A Source('decoder.cc') 482623SN/A Source('decoder_tables.cc') 492623SN/A Source('emulenv.cc') 502623SN/A Source('faults.cc') 512623SN/A Source('insts/badmicroop.cc') 522623SN/A Source('insts/microfpop.cc') 532623SN/A Source('insts/microldstop.cc') 542623SN/A Source('insts/micromediaop.cc') 552623SN/A Source('insts/microop.cc') 562623SN/A Source('insts/microregop.cc') 572623SN/A Source('insts/static_inst.cc') 582623SN/A Source('interrupts.cc') 592623SN/A Source('isa.cc') 602623SN/A Source('linux/linux.cc') 612623SN/A Source('linux/process.cc') 622623SN/A Source('linux/syscalls.cc') 632623SN/A Source('linux/system.cc') 642623SN/A Source('nativetrace.cc') 652623SN/A Source('pagetable.cc') 662623SN/A Source('pagetable_walker.cc') 672623SN/A Source('process.cc') 682623SN/A Source('remote_gdb.cc') 692623SN/A Source('stacktrace.cc') 702623SN/A Source('system.cc') 712623SN/A Source('tlb.cc') 722623SN/A Source('types.cc') 732623SN/A Source('utility.cc') 742623SN/A Source('vtophys.cc') 752623SN/A 762623SN/A SimObject('X86ISA.py') 772623SN/A SimObject('X86LocalApic.py') 782623SN/A SimObject('X86NativeTrace.py') 792623SN/A SimObject('X86System.py') 802623SN/A SimObject('X86TLB.py') 812623SN/A 822623SN/A DebugFlag('Faults', "Trace all faults/exceptions/traps") 832623SN/A DebugFlag('LocalApic', "Local APIC debugging") 842623SN/A DebugFlag('PageTableWalker', \ 852623SN/A "Page table walker state machine debugging") 862640Sstever@eecs.umich.edu DebugFlag('Decoder', "Decoder debug output") 873401Sktlim@umich.edu DebugFlag('X86', "Generic X86 ISA debugging") 882623SN/A 892623SN/A python_files = ( 903647Srdreslin@umich.edu '__init__.py', 913647Srdreslin@umich.edu 'general_purpose/__init__.py', 922623SN/A 'general_purpose/arithmetic/__init__.py', 932623SN/A 'general_purpose/arithmetic/add_and_subtract.py', 944192Sktlim@umich.edu 'general_purpose/arithmetic/increment_and_decrement.py', 954192Sktlim@umich.edu 'general_purpose/arithmetic/multiply_and_divide.py', 963349Sbinkertn@umich.edu 'general_purpose/cache_and_memory_management.py', 972623SN/A 'general_purpose/compare_and_test/__init__.py', 983349Sbinkertn@umich.edu 'general_purpose/compare_and_test/bit_scan.py', 992623SN/A 'general_purpose/compare_and_test/bit_test.py', 1003349Sbinkertn@umich.edu 'general_purpose/compare_and_test/bounds.py', 1012623SN/A 'general_purpose/compare_and_test/compare.py', 1022623SN/A 'general_purpose/compare_and_test/set_byte_on_condition.py', 1032623SN/A 'general_purpose/compare_and_test/test.py', 1042657Ssaidi@eecs.umich.edu 'general_purpose/control_transfer/__init__.py', 1052623SN/A 'general_purpose/control_transfer/call.py', 1062623SN/A 'general_purpose/control_transfer/conditional_jump.py', 1074475Sstever@eecs.umich.edu 'general_purpose/control_transfer/interrupts_and_exceptions.py', 1084475Sstever@eecs.umich.edu 'general_purpose/control_transfer/jump.py', 1093192Srdreslin@umich.edu 'general_purpose/control_transfer/loop.py', 1102623SN/A 'general_purpose/control_transfer/xreturn.py', 1112623SN/A 'general_purpose/data_conversion/__init__.py', 1124192Sktlim@umich.edu 'general_purpose/data_conversion/ascii_adjust.py', 1134192Sktlim@umich.edu 'general_purpose/data_conversion/bcd_adjust.py', 1144192Sktlim@umich.edu 'general_purpose/data_conversion/endian_conversion.py', 1154192Sktlim@umich.edu 'general_purpose/data_conversion/extract_sign_mask.py', 1164192Sktlim@umich.edu 'general_purpose/data_conversion/sign_extension.py', 1174192Sktlim@umich.edu 'general_purpose/data_conversion/translate.py', 1184192Sktlim@umich.edu 'general_purpose/data_transfer/__init__.py', 1194192Sktlim@umich.edu 'general_purpose/data_transfer/conditional_move.py', 1204192Sktlim@umich.edu 'general_purpose/data_transfer/move.py', 1214192Sktlim@umich.edu 'general_purpose/data_transfer/stack_operations.py', 1224192Sktlim@umich.edu 'general_purpose/data_transfer/xchg.py', 1232623SN/A 'general_purpose/flags/__init__.py', 1243349Sbinkertn@umich.edu 'general_purpose/flags/load_and_store.py', 1253349Sbinkertn@umich.edu 'general_purpose/flags/push_and_pop.py', 1263349Sbinkertn@umich.edu 'general_purpose/flags/set_and_clear.py', 1273349Sbinkertn@umich.edu 'general_purpose/input_output/__init__.py', 1283349Sbinkertn@umich.edu 'general_purpose/input_output/general_io.py', 1293349Sbinkertn@umich.edu 'general_purpose/input_output/string_io.py', 1304040Ssaidi@eecs.umich.edu 'general_purpose/load_effective_address.py', 1312623SN/A 'general_purpose/load_segment_registers.py', 1322623SN/A 'general_purpose/logical.py', 1332662Sstever@eecs.umich.edu 'general_purpose/no_operation.py', 1342623SN/A 'general_purpose/rotate_and_shift/__init__.py', 1352623SN/A 'general_purpose/rotate_and_shift/rotate.py', 1362623SN/A 'general_purpose/rotate_and_shift/shift.py', 1372856Srdreslin@umich.edu 'general_purpose/semaphores.py', 1382856Srdreslin@umich.edu 'general_purpose/string/__init__.py', 1392623SN/A 'general_purpose/string/compare_strings.py', 1402623SN/A 'general_purpose/string/load_string.py', 1412915Sktlim@umich.edu 'general_purpose/string/move_string.py', 1422623SN/A 'general_purpose/string/scan_string.py', 1432798Sktlim@umich.edu 'general_purpose/string/store_string.py', 1442623SN/A 'general_purpose/system_calls.py', 1452623SN/A 'romutil.py', 1462623SN/A 'system/__init__.py', 1472623SN/A 'system/control_registers.py', 1482623SN/A 'system/halt.py', 1492623SN/A 'system/invlpg.py', 1502623SN/A 'system/undefined_operation.py', 1512623SN/A 'system/msrs.py', 1522623SN/A 'system/segmentation.py', 1532623SN/A 'simd128/__init__.py', 1542623SN/A 'simd128/integer/__init__.py', 1552623SN/A 'simd128/integer/data_transfer/__init__.py', 1562623SN/A 'simd128/integer/data_transfer/move.py', 157 'simd128/integer/data_transfer/move_non_temporal.py', 158 'simd128/integer/data_transfer/move_mask.py', 159 'simd128/integer/data_conversion/__init__.py', 160 'simd128/integer/data_conversion/convert_mmx_integer_to_floating_point.py', 161 'simd128/integer/data_conversion/convert_integer_to_floating_point.py', 162 'simd128/integer/data_conversion/convert_gpr_integer_to_floating_point.py', 163 'simd128/integer/data_reordering/__init__.py', 164 'simd128/integer/data_reordering/unpack_and_interleave.py', 165 'simd128/integer/data_reordering/pack_with_saturation.py', 166 'simd128/integer/data_reordering/extract_and_insert.py', 167 'simd128/integer/data_reordering/shuffle.py', 168 'simd128/integer/arithmetic/__init__.py', 169 'simd128/integer/arithmetic/subtraction.py', 170 'simd128/integer/arithmetic/addition.py', 171 'simd128/integer/arithmetic/multiplication.py', 172 'simd128/integer/arithmetic/multiply_add.py', 173 'simd128/integer/arithmetic/average.py', 174 'simd128/integer/arithmetic/sum_of_absolute_differences.py', 175 'simd128/integer/shift/__init__.py', 176 'simd128/integer/shift/right_arithmetic_shift.py', 177 'simd128/integer/shift/left_logical_shift.py', 178 'simd128/integer/shift/right_logical_shift.py', 179 'simd128/integer/compare/__init__.py', 180 'simd128/integer/compare/compare_and_write_mask.py', 181 'simd128/integer/compare/compare_and_write_minimum_or_maximum.py', 182 'simd128/integer/logical/__init__.py', 183 'simd128/integer/logical/pand.py', 184 'simd128/integer/logical/por.py', 185 'simd128/integer/logical/exclusive_or.py', 186 'simd128/integer/save_and_restore_state/__init__.py', 187 'simd128/integer/save_and_restore_state/save_and_restore_state.py', 188 'simd128/integer/save_and_restore_state/save_and_restore_control_and_status.py', 189 'simd128/floating_point/__init__.py', 190 'simd128/floating_point/data_transfer/__init__.py', 191 'simd128/floating_point/data_transfer/move_mask.py', 192 'simd128/floating_point/data_transfer/move.py', 193 'simd128/floating_point/data_transfer/move_with_duplication.py', 194 'simd128/floating_point/data_transfer/move_non_temporal.py', 195 'simd128/floating_point/data_conversion/__init__.py', 196 'simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py', 197 'simd128/floating_point/data_conversion/convert_floating_point_to_xmm_integer.py', 198 'simd128/floating_point/data_conversion/convert_floating_point_to_mmx_integer.py', 199 'simd128/floating_point/data_conversion/convert_floating_point_to_gpr_integer.py', 200 'simd128/floating_point/data_reordering/__init__.py', 201 'simd128/floating_point/data_reordering/unpack_and_interleave.py', 202 'simd128/floating_point/data_reordering/shuffle.py', 203 'simd128/floating_point/arithmetic/__init__.py', 204 'simd128/floating_point/arithmetic/subtraction.py', 205 'simd128/floating_point/arithmetic/addition.py', 206 'simd128/floating_point/arithmetic/horizontal_subtraction.py', 207 'simd128/floating_point/arithmetic/horizontal_addition.py', 208 'simd128/floating_point/arithmetic/square_root.py', 209 'simd128/floating_point/arithmetic/simultaneous_addition_and_subtraction.py', 210 'simd128/floating_point/arithmetic/multiplication.py', 211 'simd128/floating_point/arithmetic/division.py', 212 'simd128/floating_point/arithmetic/reciprocal_square_root.py', 213 'simd128/floating_point/arithmetic/reciprocal_estimation.py', 214 'simd128/floating_point/compare/__init__.py', 215 'simd128/floating_point/compare/compare_and_write_mask.py', 216 'simd128/floating_point/compare/compare_and_write_rflags.py', 217 'simd128/floating_point/compare/compare_and_write_minimum_or_maximum.py', 218 'simd128/floating_point/logical/__init__.py', 219 'simd128/floating_point/logical/andp.py', 220 'simd128/floating_point/logical/orp.py', 221 'simd128/floating_point/logical/exclusive_or.py', 222 'simd64/__init__.py', 223 'simd64/integer/__init__.py', 224 'simd64/integer/data_transfer/__init__.py', 225 'simd64/integer/data_transfer/move_mask.py', 226 'simd64/integer/data_transfer/move.py', 227 'simd64/integer/data_transfer/move_non_temporal.py', 228 'simd64/integer/exit_media_state.py', 229 'simd64/integer/data_reordering/__init__.py', 230 'simd64/integer/data_reordering/unpack_and_interleave.py', 231 'simd64/integer/data_reordering/pack_with_saturation.py', 232 'simd64/integer/data_reordering/extract_and_insert.py', 233 'simd64/integer/data_reordering/shuffle_and_swap.py', 234 'simd64/integer/data_conversion.py', 235 'simd64/integer/arithmetic/__init__.py', 236 'simd64/integer/arithmetic/subtraction.py', 237 'simd64/integer/arithmetic/addition.py', 238 'simd64/integer/arithmetic/multiplication.py', 239 'simd64/integer/arithmetic/multiply_add.py', 240 'simd64/integer/arithmetic/average.py', 241 'simd64/integer/arithmetic/sum_of_absolute_differences.py', 242 'simd64/integer/shift/__init__.py', 243 'simd64/integer/shift/right_arithmetic_shift.py', 244 'simd64/integer/shift/left_logical_shift.py', 245 'simd64/integer/shift/right_logical_shift.py', 246 'simd64/integer/compare/__init__.py', 247 'simd64/integer/compare/compare_and_write_mask.py', 248 'simd64/integer/compare/compare_and_write_minimum_or_maximum.py', 249 'simd64/integer/logical/__init__.py', 250 'simd64/integer/logical/pand.py', 251 'simd64/integer/logical/por.py', 252 'simd64/integer/logical/exclusive_or.py', 253 'simd64/integer/save_and_restore_state.py', 254 'simd64/floating_point/__init__.py', 255 'simd64/floating_point/arithmetic/__init__.py', 256 'simd64/floating_point/arithmetic/subtraction.py', 257 'simd64/floating_point/arithmetic/addition.py', 258 'simd64/floating_point/arithmetic/reciprocal_estimation.py', 259 'simd64/floating_point/arithmetic/multiplication.py', 260 'simd64/floating_point/arithmetic/accumulation.py', 261 'simd64/floating_point/arithmetic/reciprocal_square_root.py', 262 'simd64/floating_point/data_conversion.py', 263 'simd64/floating_point/compare/__init__.py', 264 'simd64/floating_point/compare/compare_and_write_mask.py', 265 'simd64/floating_point/compare/compare_and_write_minimum_or_maximum.py', 266 'x87/__init__.py', 267 'x87/data_transfer_and_conversion/__init__.py', 268 'x87/data_transfer_and_conversion/convert_and_load_or_store_integer.py', 269 'x87/data_transfer_and_conversion/load_or_store_floating_point.py', 270 'x87/data_transfer_and_conversion/exchange.py', 271 'x87/data_transfer_and_conversion/convert_and_load_or_store_bcd.py', 272 'x87/data_transfer_and_conversion/conditional_move.py', 273 'x87/data_transfer_and_conversion/extract.py', 274 'x87/load_constants/__init__.py', 275 'x87/load_constants/load_0_1_or_pi.py', 276 'x87/load_constants/load_logarithm.py', 277 'x87/arithmetic/__init__.py', 278 'x87/arithmetic/subtraction.py', 279 'x87/arithmetic/addition.py', 280 'x87/arithmetic/partial_remainder.py', 281 'x87/arithmetic/multiplication.py', 282 'x87/arithmetic/division.py', 283 'x87/arithmetic/change_sign.py', 284 'x87/arithmetic/round.py', 285 'x87/arithmetic/square_root.py', 286 'x87/transcendental_functions/__init__.py', 287 'x87/transcendental_functions/trigonometric_functions.py', 288 'x87/transcendental_functions/logarithmic_functions.py', 289 'x87/compare_and_test/__init__.py', 290 'x87/compare_and_test/classify.py', 291 'x87/compare_and_test/test.py', 292 'x87/compare_and_test/floating_point_ordered_compare.py', 293 'x87/compare_and_test/floating_point_unordered_compare.py', 294 'x87/compare_and_test/integer_compare.py', 295 'x87/stack_management/__init__.py', 296 'x87/stack_management/stack_control.py', 297 'x87/stack_management/clear_state.py', 298 'x87/control/__init__.py', 299 'x87/control/clear_exceptions.py', 300 'x87/control/initialize.py', 301 'x87/control/wait_for_exceptions.py', 302 'x87/control/save_x87_status_word.py', 303 'x87/control/save_and_restore_x87_control_word.py', 304 'x87/control/save_and_restore_x87_environment.py', 305 'x87/no_operation.py' 306 ) 307 308 309 # Add in files generated by the ISA description. 310 isa_desc_files = env.ISADesc('isa/main.isa') 311 for f in isa_desc_files: 312 # Add in python file dependencies that won't be caught otherwise 313 for pyfile in python_files: 314 env.Depends(f, "isa/insts/%s" % pyfile) 315 # Only non-header files need to be compiled. 316 if not f.path.endswith('.hh'): 317 Source(f) 318