SConscript revision 8766
12929Sktlim@umich.edu# -*- mode:python -*- 22929Sktlim@umich.edu 32932Sktlim@umich.edu# Copyright (c) 2007-2008 The Hewlett-Packard Development Company 42929Sktlim@umich.edu# All rights reserved. 52929Sktlim@umich.edu# 62929Sktlim@umich.edu# The license below extends only to copyright in the software and shall 72929Sktlim@umich.edu# not be construed as granting a license to any other intellectual 82929Sktlim@umich.edu# property including but not limited to intellectual property relating 92929Sktlim@umich.edu# to a hardware implementation of the functionality of the software 102929Sktlim@umich.edu# licensed hereunder. You may use the software subject to the license 112929Sktlim@umich.edu# terms below provided that you ensure that this notice is replicated 122929Sktlim@umich.edu# unmodified and in its entirety in all distributions of the software, 132929Sktlim@umich.edu# modified or unmodified, in source code or in binary form. 142929Sktlim@umich.edu# 152929Sktlim@umich.edu# Copyright (c) 2005-2006 The Regents of The University of Michigan 162929Sktlim@umich.edu# All rights reserved. 172929Sktlim@umich.edu# 182929Sktlim@umich.edu# Redistribution and use in source and binary forms, with or without 192929Sktlim@umich.edu# modification, are permitted provided that the following conditions are 202929Sktlim@umich.edu# met: redistributions of source code must retain the above copyright 212929Sktlim@umich.edu# notice, this list of conditions and the following disclaimer; 222929Sktlim@umich.edu# redistributions in binary form must reproduce the above copyright 232929Sktlim@umich.edu# notice, this list of conditions and the following disclaimer in the 242929Sktlim@umich.edu# documentation and/or other materials provided with the distribution; 252929Sktlim@umich.edu# neither the name of the copyright holders nor the names of its 262929Sktlim@umich.edu# contributors may be used to endorse or promote products derived from 272929Sktlim@umich.edu# this software without specific prior written permission. 282932Sktlim@umich.edu# 292932Sktlim@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 302932Sktlim@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 312929Sktlim@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 322929Sktlim@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 332929Sktlim@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 342929Sktlim@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 352929Sktlim@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 362929Sktlim@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 372929Sktlim@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 382929Sktlim@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 392929Sktlim@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 402929Sktlim@umich.edu# 412929Sktlim@umich.edu# Authors: Gabe Black 422929Sktlim@umich.edu 432929Sktlim@umich.eduImport('*') 442929Sktlim@umich.edu 452929Sktlim@umich.eduif env['TARGET_ISA'] == 'x86': 462929Sktlim@umich.edu Source('cpuid.cc') 472929Sktlim@umich.edu Source('emulenv.cc') 482929Sktlim@umich.edu Source('faults.cc') 492929Sktlim@umich.edu Source('insts/badmicroop.cc') 502929Sktlim@umich.edu Source('insts/microfpop.cc') 512929Sktlim@umich.edu Source('insts/microldstop.cc') 522929Sktlim@umich.edu Source('insts/micromediaop.cc') 532929Sktlim@umich.edu Source('insts/microop.cc') 542929Sktlim@umich.edu Source('insts/microregop.cc') 552929Sktlim@umich.edu Source('insts/static_inst.cc') 562929Sktlim@umich.edu Source('interrupts.cc') 572929Sktlim@umich.edu Source('isa.cc') 582929Sktlim@umich.edu Source('nativetrace.cc') 592929Sktlim@umich.edu Source('pagetable.cc') 602929Sktlim@umich.edu Source('pagetable_walker.cc') 612929Sktlim@umich.edu Source('predecoder.cc') 622929Sktlim@umich.edu Source('predecoder_tables.cc') 632929Sktlim@umich.edu Source('remote_gdb.cc') 643020Sstever@eecs.umich.edu Source('tlb.cc') 653020Sstever@eecs.umich.edu Source('types.cc') 663020Sstever@eecs.umich.edu Source('utility.cc') 672929Sktlim@umich.edu Source('vtophys.cc') 682929Sktlim@umich.edu 693021Sstever@eecs.umich.edu SimObject('X86LocalApic.py') 702929Sktlim@umich.edu SimObject('X86NativeTrace.py') 712929Sktlim@umich.edu SimObject('X86TLB.py') 722929Sktlim@umich.edu 732929Sktlim@umich.edu DebugFlag('Faults', "Trace all faults/exceptions/traps") 742929Sktlim@umich.edu DebugFlag('LocalApic', "Local APIC debugging") 752929Sktlim@umich.edu DebugFlag('PageTableWalker', \ 762929Sktlim@umich.edu "Page table walker state machine debugging") 772929Sktlim@umich.edu DebugFlag('Predecoder', "Predecoder debug output") 782929Sktlim@umich.edu DebugFlag('X86', "Generic X86 ISA debugging") 792929Sktlim@umich.edu 802929Sktlim@umich.edu if env['FULL_SYSTEM']: 812929Sktlim@umich.edu 822929Sktlim@umich.edu SimObject('X86System.py') 832929Sktlim@umich.edu 842929Sktlim@umich.edu # Full-system sources 852929Sktlim@umich.edu Source('linux/system.cc') 862929Sktlim@umich.edu Source('system.cc') 872929Sktlim@umich.edu Source('stacktrace.cc') 882929Sktlim@umich.edu else: 892929Sktlim@umich.edu Source('process.cc') 902929Sktlim@umich.edu 912929Sktlim@umich.edu Source('linux/linux.cc') 922929Sktlim@umich.edu Source('linux/process.cc') 932929Sktlim@umich.edu Source('linux/syscalls.cc') 942929Sktlim@umich.edu 952929Sktlim@umich.edu python_files = ( 962929Sktlim@umich.edu '__init__.py', 972929Sktlim@umich.edu 'general_purpose/__init__.py', 982929Sktlim@umich.edu 'general_purpose/arithmetic/__init__.py', 992929Sktlim@umich.edu 'general_purpose/arithmetic/add_and_subtract.py', 1002929Sktlim@umich.edu 'general_purpose/arithmetic/increment_and_decrement.py', 1012929Sktlim@umich.edu 'general_purpose/arithmetic/multiply_and_divide.py', 1022929Sktlim@umich.edu 'general_purpose/cache_and_memory_management.py', 1032929Sktlim@umich.edu 'general_purpose/compare_and_test/__init__.py', 1042929Sktlim@umich.edu 'general_purpose/compare_and_test/bit_scan.py', 1054937Sstever@gmail.com 'general_purpose/compare_and_test/bit_test.py', 1064937Sstever@gmail.com 'general_purpose/compare_and_test/bounds.py', 1074937Sstever@gmail.com 'general_purpose/compare_and_test/compare.py', 1084937Sstever@gmail.com 'general_purpose/compare_and_test/set_byte_on_condition.py', 1094937Sstever@gmail.com 'general_purpose/compare_and_test/test.py', 1104937Sstever@gmail.com 'general_purpose/control_transfer/__init__.py', 1114937Sstever@gmail.com 'general_purpose/control_transfer/call.py', 1124937Sstever@gmail.com 'general_purpose/control_transfer/conditional_jump.py', 1134937Sstever@gmail.com 'general_purpose/control_transfer/interrupts_and_exceptions.py', 1144937Sstever@gmail.com 'general_purpose/control_transfer/jump.py', 1154937Sstever@gmail.com 'general_purpose/control_transfer/loop.py', 1164937Sstever@gmail.com 'general_purpose/control_transfer/xreturn.py', 1174937Sstever@gmail.com 'general_purpose/data_conversion/__init__.py', 1182929Sktlim@umich.edu 'general_purpose/data_conversion/ascii_adjust.py', 1192929Sktlim@umich.edu 'general_purpose/data_conversion/bcd_adjust.py', 1202929Sktlim@umich.edu 'general_purpose/data_conversion/endian_conversion.py', 1212929Sktlim@umich.edu 'general_purpose/data_conversion/extract_sign_mask.py', 1222929Sktlim@umich.edu 'general_purpose/data_conversion/sign_extension.py', 1232929Sktlim@umich.edu 'general_purpose/data_conversion/translate.py', 1242929Sktlim@umich.edu 'general_purpose/data_transfer/__init__.py', 1252929Sktlim@umich.edu 'general_purpose/data_transfer/conditional_move.py', 1262929Sktlim@umich.edu 'general_purpose/data_transfer/move.py', 1272929Sktlim@umich.edu 'general_purpose/data_transfer/stack_operations.py', 1284937Sstever@gmail.com 'general_purpose/data_transfer/xchg.py', 1294937Sstever@gmail.com 'general_purpose/flags/__init__.py', 1304937Sstever@gmail.com 'general_purpose/flags/load_and_store.py', 1314937Sstever@gmail.com 'general_purpose/flags/push_and_pop.py', 1324937Sstever@gmail.com 'general_purpose/flags/set_and_clear.py', 1334937Sstever@gmail.com 'general_purpose/input_output/__init__.py', 1344937Sstever@gmail.com 'general_purpose/input_output/general_io.py', 1354937Sstever@gmail.com 'general_purpose/input_output/string_io.py', 1364937Sstever@gmail.com 'general_purpose/load_effective_address.py', 1374937Sstever@gmail.com 'general_purpose/load_segment_registers.py', 1384937Sstever@gmail.com 'general_purpose/logical.py', 1394937Sstever@gmail.com 'general_purpose/no_operation.py', 1404937Sstever@gmail.com 'general_purpose/rotate_and_shift/__init__.py', 1414937Sstever@gmail.com 'general_purpose/rotate_and_shift/rotate.py', 1424937Sstever@gmail.com 'general_purpose/rotate_and_shift/shift.py', 1432929Sktlim@umich.edu 'general_purpose/semaphores.py', 1442929Sktlim@umich.edu 'general_purpose/string/__init__.py', 1452929Sktlim@umich.edu 'general_purpose/string/compare_strings.py', 1462929Sktlim@umich.edu 'general_purpose/string/load_string.py', 1472929Sktlim@umich.edu 'general_purpose/string/move_string.py', 1482929Sktlim@umich.edu 'general_purpose/string/scan_string.py', 1492929Sktlim@umich.edu 'general_purpose/string/store_string.py', 1502929Sktlim@umich.edu 'general_purpose/system_calls.py', 1512929Sktlim@umich.edu 'romutil.py', 1522929Sktlim@umich.edu 'system/__init__.py', 1532929Sktlim@umich.edu 'system/control_registers.py', 1542929Sktlim@umich.edu 'system/halt.py', 1552929Sktlim@umich.edu 'system/invlpg.py', 1562929Sktlim@umich.edu 'system/undefined_operation.py', 1572929Sktlim@umich.edu 'system/msrs.py', 1582929Sktlim@umich.edu 'system/segmentation.py', 1592997Sstever@eecs.umich.edu 'simd128/__init__.py', 1602997Sstever@eecs.umich.edu 'simd128/integer/__init__.py', 1612929Sktlim@umich.edu 'simd128/integer/data_transfer/__init__.py', 1622997Sstever@eecs.umich.edu 'simd128/integer/data_transfer/move.py', 1632997Sstever@eecs.umich.edu 'simd128/integer/data_transfer/move_non_temporal.py', 1642929Sktlim@umich.edu 'simd128/integer/data_transfer/move_mask.py', 1652997Sstever@eecs.umich.edu 'simd128/integer/data_conversion/__init__.py', 1662997Sstever@eecs.umich.edu 'simd128/integer/data_conversion/convert_mmx_integer_to_floating_point.py', 1672997Sstever@eecs.umich.edu 'simd128/integer/data_conversion/convert_integer_to_floating_point.py', 1682929Sktlim@umich.edu 'simd128/integer/data_conversion/convert_gpr_integer_to_floating_point.py', 1692997Sstever@eecs.umich.edu 'simd128/integer/data_reordering/__init__.py', 1702997Sstever@eecs.umich.edu 'simd128/integer/data_reordering/unpack_and_interleave.py', 1712997Sstever@eecs.umich.edu 'simd128/integer/data_reordering/pack_with_saturation.py', 1722997Sstever@eecs.umich.edu 'simd128/integer/data_reordering/extract_and_insert.py', 1732997Sstever@eecs.umich.edu 'simd128/integer/data_reordering/shuffle.py', 1742997Sstever@eecs.umich.edu 'simd128/integer/arithmetic/__init__.py', 1752997Sstever@eecs.umich.edu 'simd128/integer/arithmetic/subtraction.py', 1762997Sstever@eecs.umich.edu 'simd128/integer/arithmetic/addition.py', 1772997Sstever@eecs.umich.edu 'simd128/integer/arithmetic/multiplication.py', 1782997Sstever@eecs.umich.edu 'simd128/integer/arithmetic/multiply_add.py', 1792997Sstever@eecs.umich.edu 'simd128/integer/arithmetic/average.py', 1802997Sstever@eecs.umich.edu 'simd128/integer/arithmetic/sum_of_absolute_differences.py', 1815525Sstever@gmail.com 'simd128/integer/shift/__init__.py', 1825525Sstever@gmail.com 'simd128/integer/shift/right_arithmetic_shift.py', 1835525Sstever@gmail.com 'simd128/integer/shift/left_logical_shift.py', 1842997Sstever@eecs.umich.edu 'simd128/integer/shift/right_logical_shift.py', 1852997Sstever@eecs.umich.edu 'simd128/integer/compare/__init__.py', 1862997Sstever@eecs.umich.edu 'simd128/integer/compare/compare_and_write_mask.py', 1875525Sstever@gmail.com 'simd128/integer/compare/compare_and_write_minimum_or_maximum.py', 1882997Sstever@eecs.umich.edu 'simd128/integer/logical/__init__.py', 1895525Sstever@gmail.com 'simd128/integer/logical/pand.py', 1904781Snate@binkert.org 'simd128/integer/logical/por.py', 1912997Sstever@eecs.umich.edu 'simd128/integer/logical/exclusive_or.py', 1925525Sstever@gmail.com 'simd128/integer/save_and_restore_state/__init__.py', 1932929Sktlim@umich.edu 'simd128/integer/save_and_restore_state/save_and_restore_state.py', 1942997Sstever@eecs.umich.edu 'simd128/integer/save_and_restore_state/save_and_restore_control_and_status.py', 1952997Sstever@eecs.umich.edu 'simd128/floating_point/__init__.py', 1962997Sstever@eecs.umich.edu 'simd128/floating_point/data_transfer/__init__.py', 1972997Sstever@eecs.umich.edu 'simd128/floating_point/data_transfer/move_mask.py', 1982929Sktlim@umich.edu 'simd128/floating_point/data_transfer/move.py', 1992997Sstever@eecs.umich.edu 'simd128/floating_point/data_transfer/move_with_duplication.py', 2002997Sstever@eecs.umich.edu 'simd128/floating_point/data_transfer/move_non_temporal.py', 2012997Sstever@eecs.umich.edu 'simd128/floating_point/data_conversion/__init__.py', 2022997Sstever@eecs.umich.edu 'simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py', 2032997Sstever@eecs.umich.edu 'simd128/floating_point/data_conversion/convert_floating_point_to_xmm_integer.py', 2042997Sstever@eecs.umich.edu 'simd128/floating_point/data_conversion/convert_floating_point_to_mmx_integer.py', 2052997Sstever@eecs.umich.edu 'simd128/floating_point/data_conversion/convert_floating_point_to_gpr_integer.py', 2062929Sktlim@umich.edu 'simd128/floating_point/data_reordering/__init__.py', 2072997Sstever@eecs.umich.edu 'simd128/floating_point/data_reordering/unpack_and_interleave.py', 2082929Sktlim@umich.edu 'simd128/floating_point/data_reordering/shuffle.py', 2092929Sktlim@umich.edu 'simd128/floating_point/arithmetic/__init__.py', 2103005Sstever@eecs.umich.edu 'simd128/floating_point/arithmetic/subtraction.py', 2113005Sstever@eecs.umich.edu 'simd128/floating_point/arithmetic/addition.py', 2123005Sstever@eecs.umich.edu 'simd128/floating_point/arithmetic/horizontal_subtraction.py', 2133005Sstever@eecs.umich.edu 'simd128/floating_point/arithmetic/horizontal_addition.py', 2143005Sstever@eecs.umich.edu 'simd128/floating_point/arithmetic/square_root.py', 2153005Sstever@eecs.umich.edu 'simd128/floating_point/arithmetic/simultaneous_addition_and_subtraction.py', 2163005Sstever@eecs.umich.edu 'simd128/floating_point/arithmetic/multiplication.py', 2173005Sstever@eecs.umich.edu 'simd128/floating_point/arithmetic/division.py', 2183691Shsul@eecs.umich.edu 'simd128/floating_point/arithmetic/reciprocal_square_root.py', 2194781Snate@binkert.org 'simd128/floating_point/arithmetic/reciprocal_estimation.py', 2204130Ssaidi@eecs.umich.edu 'simd128/floating_point/compare/__init__.py', 2214130Ssaidi@eecs.umich.edu 'simd128/floating_point/compare/compare_and_write_mask.py', 2224130Ssaidi@eecs.umich.edu 'simd128/floating_point/compare/compare_and_write_rflags.py', 2233691Shsul@eecs.umich.edu 'simd128/floating_point/compare/compare_and_write_minimum_or_maximum.py', 2243005Sstever@eecs.umich.edu 'simd128/floating_point/logical/__init__.py', 2254019Sstever@eecs.umich.edu 'simd128/floating_point/logical/andp.py', 2263005Sstever@eecs.umich.edu 'simd128/floating_point/logical/orp.py', 2272929Sktlim@umich.edu 'simd128/floating_point/logical/exclusive_or.py', 2282929Sktlim@umich.edu 'simd64/__init__.py', 2293005Sstever@eecs.umich.edu 'simd64/integer/__init__.py', 2302997Sstever@eecs.umich.edu 'simd64/integer/data_transfer/__init__.py', 2312997Sstever@eecs.umich.edu 'simd64/integer/data_transfer/move_mask.py', 2322997Sstever@eecs.umich.edu 'simd64/integer/data_transfer/move.py', 2332929Sktlim@umich.edu 'simd64/integer/data_transfer/move_non_temporal.py', 234 'simd64/integer/exit_media_state.py', 235 'simd64/integer/data_reordering/__init__.py', 236 'simd64/integer/data_reordering/unpack_and_interleave.py', 237 'simd64/integer/data_reordering/pack_with_saturation.py', 238 'simd64/integer/data_reordering/extract_and_insert.py', 239 'simd64/integer/data_reordering/shuffle_and_swap.py', 240 'simd64/integer/data_conversion.py', 241 'simd64/integer/arithmetic/__init__.py', 242 'simd64/integer/arithmetic/subtraction.py', 243 'simd64/integer/arithmetic/addition.py', 244 'simd64/integer/arithmetic/multiplication.py', 245 'simd64/integer/arithmetic/multiply_add.py', 246 'simd64/integer/arithmetic/average.py', 247 'simd64/integer/arithmetic/sum_of_absolute_differences.py', 248 'simd64/integer/shift/__init__.py', 249 'simd64/integer/shift/right_arithmetic_shift.py', 250 'simd64/integer/shift/left_logical_shift.py', 251 'simd64/integer/shift/right_logical_shift.py', 252 'simd64/integer/compare/__init__.py', 253 'simd64/integer/compare/compare_and_write_mask.py', 254 'simd64/integer/compare/compare_and_write_minimum_or_maximum.py', 255 'simd64/integer/logical/__init__.py', 256 'simd64/integer/logical/pand.py', 257 'simd64/integer/logical/por.py', 258 'simd64/integer/logical/exclusive_or.py', 259 'simd64/integer/save_and_restore_state.py', 260 'simd64/floating_point/__init__.py', 261 'simd64/floating_point/arithmetic/__init__.py', 262 'simd64/floating_point/arithmetic/subtraction.py', 263 'simd64/floating_point/arithmetic/addition.py', 264 'simd64/floating_point/arithmetic/reciprocal_estimation.py', 265 'simd64/floating_point/arithmetic/multiplication.py', 266 'simd64/floating_point/arithmetic/accumulation.py', 267 'simd64/floating_point/arithmetic/reciprocal_square_root.py', 268 'simd64/floating_point/data_conversion.py', 269 'simd64/floating_point/compare/__init__.py', 270 'simd64/floating_point/compare/compare_and_write_mask.py', 271 'simd64/floating_point/compare/compare_and_write_minimum_or_maximum.py', 272 'x87/__init__.py', 273 'x87/data_transfer_and_conversion/__init__.py', 274 'x87/data_transfer_and_conversion/convert_and_load_or_store_integer.py', 275 'x87/data_transfer_and_conversion/load_or_store_floating_point.py', 276 'x87/data_transfer_and_conversion/exchange.py', 277 'x87/data_transfer_and_conversion/convert_and_load_or_store_bcd.py', 278 'x87/data_transfer_and_conversion/conditional_move.py', 279 'x87/data_transfer_and_conversion/extract.py', 280 'x87/load_constants/__init__.py', 281 'x87/load_constants/load_0_1_or_pi.py', 282 'x87/load_constants/load_logarithm.py', 283 'x87/arithmetic/__init__.py', 284 'x87/arithmetic/subtraction.py', 285 'x87/arithmetic/addition.py', 286 'x87/arithmetic/partial_remainder.py', 287 'x87/arithmetic/multiplication.py', 288 'x87/arithmetic/division.py', 289 'x87/arithmetic/change_sign.py', 290 'x87/arithmetic/round.py', 291 'x87/arithmetic/square_root.py', 292 'x87/transcendental_functions/__init__.py', 293 'x87/transcendental_functions/trigonometric_functions.py', 294 'x87/transcendental_functions/logarithmic_functions.py', 295 'x87/compare_and_test/__init__.py', 296 'x87/compare_and_test/classify.py', 297 'x87/compare_and_test/test.py', 298 'x87/compare_and_test/floating_point_ordered_compare.py', 299 'x87/compare_and_test/floating_point_unordered_compare.py', 300 'x87/compare_and_test/integer_compare.py', 301 'x87/stack_management/__init__.py', 302 'x87/stack_management/stack_control.py', 303 'x87/stack_management/clear_state.py', 304 'x87/control/__init__.py', 305 'x87/control/clear_exceptions.py', 306 'x87/control/initialize.py', 307 'x87/control/wait_for_exceptions.py', 308 'x87/control/save_x87_status_word.py', 309 'x87/control/save_and_restore_x87_control_word.py', 310 'x87/control/save_and_restore_x87_environment.py', 311 'x87/no_operation.py' 312 ) 313 314 315 # Add in files generated by the ISA description. 316 isa_desc_files = env.ISADesc('isa/main.isa') 317 for f in isa_desc_files: 318 # Add in python file dependencies that won't be caught otherwise 319 for pyfile in python_files: 320 env.Depends(f, "isa/insts/%s" % pyfile) 321 # Only non-header files need to be compiled. 322 if not f.path.endswith('.hh'): 323 Source(f) 324