SConscript revision 5245:d94bb8af9f76
13691SN/A# -*- mode:python -*- 23691SN/A 33691SN/A# Copyright (c) 2005-2006 The Regents of The University of Michigan 43691SN/A# All rights reserved. 53691SN/A# 63691SN/A# Redistribution and use in source and binary forms, with or without 79885Sstever@gmail.com# modification, are permitted provided that the following conditions are 83691SN/A# met: redistributions of source code must retain the above copyright 93691SN/A# notice, this list of conditions and the following disclaimer; 103691SN/A# redistributions in binary form must reproduce the above copyright 113691SN/A# notice, this list of conditions and the following disclaimer in the 123691SN/A# documentation and/or other materials provided with the distribution; 133691SN/A# neither the name of the copyright holders nor the names of its 143691SN/A# contributors may be used to endorse or promote products derived from 153691SN/A# this software without specific prior written permission. 163691SN/A# 173691SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 183691SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 193691SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 203691SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 213691SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 223691SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 233691SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 243691SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 253691SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 263691SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 273691SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 283691SN/A# 293691SN/A# Authors: Gabe Black 303691SN/A 313691SN/A# Copyright (c) 2007 The Hewlett-Packard Development Company 323691SN/A# All rights reserved. 333691SN/A# 343691SN/A# Redistribution and use of this software in source and binary forms, 353691SN/A# with or without modification, are permitted provided that the 363691SN/A# following conditions are met: 373691SN/A# 383691SN/A# The software must be used only for Non-Commercial Use which means any 399885Sstever@gmail.com# use which is NOT directed to receiving any direct monetary 403691SN/A# compensation for, or commercial advantage from such use. Illustrative 413691SN/A# examples of non-commercial use are academic research, personal study, 423691SN/A# teaching, education and corporate research & development. 433691SN/A# Illustrative examples of commercial use are distributing products for 443691SN/A# commercial advantage and providing services using the software for 453691SN/A# commercial advantage. 463691SN/A# 473691SN/A# If you wish to use this software or functionality therein that may be 483691SN/A# covered by patents for commercial use, please contact: 493691SN/A# Director of Intellectual Property Licensing 503691SN/A# Office of Strategy and Technology 513691SN/A# Hewlett-Packard Company 523691SN/A# 1501 Page Mill Road 533691SN/A# Palo Alto, California 94304 543691SN/A# 553691SN/A# Redistributions of source code must retain the above copyright notice, 563691SN/A# this list of conditions and the following disclaimer. Redistributions 573691SN/A# in binary form must reproduce the above copyright notice, this list of 585778SN/A# conditions and the following disclaimer in the documentation and/or 593691SN/A# other materials provided with the distribution. Neither the name of 603691SN/A# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 613691SN/A# contributors may be used to endorse or promote products derived from 6211219Snilay@cs.wisc.edu# this software without specific prior written permission. No right of 633691SN/A# sublicense is granted herewith. Derivatives of the software and 643691SN/A# output created using the software may be prepared, but only for 653691SN/A# Non-Commercial Uses. Derivatives of the software may be shared with 663691SN/A# others provided: (i) the others agree to abide by the list of 673691SN/A# conditions herein which includes the Non-Commercial Use restrictions; 683691SN/A# and (ii) such Derivatives of the software include the above copyright 693691SN/A# notice to acknowledge the contribution from this software where 705778SN/A# applicable, this list of conditions and the disclaimer below. 713691SN/A# 723691SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 733691SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 743691SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 753691SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 763691SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 774966SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 783691SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 793691SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 803691SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 813691SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 823691SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 833691SN/A# 843691SN/A# Authors: Gabe Black 853691SN/A 863691SN/AImport('*') 873691SN/A 883691SN/Aif env['TARGET_ISA'] == 'x86': 893691SN/A Source('emulenv.cc') 903691SN/A Source('floatregfile.cc') 913691SN/A Source('faults.cc') 923691SN/A Source('insts/microfpop.cc') 933691SN/A Source('insts/microldstop.cc') 943691SN/A Source('insts/microop.cc') 953691SN/A Source('insts/microregop.cc') 963691SN/A Source('insts/static_inst.cc') 973691SN/A Source('intregfile.cc') 983691SN/A Source('miscregfile.cc') 993691SN/A Source('pagetable.cc') 1003691SN/A Source('predecoder.cc') 1013691SN/A Source('predecoder_tables.cc') 1023691SN/A Source('regfile.cc') 1033691SN/A Source('remote_gdb.cc') 1044966SN/A Source('tlb.cc') 1054966SN/A Source('utility.cc') 1064966SN/A 1074966SN/A SimObject('X86TLB.py') 1084966SN/A TraceFlag('Predecoder') 1093691SN/A TraceFlag('X86') 1104966SN/A 1114966SN/A if env['FULL_SYSTEM']: 1124966SN/A SimObject('X86System.py') 1134966SN/A 1144966SN/A # Full-system sources 1154966SN/A Source('pagetable_walker.cc') 1164966SN/A Source('system.cc') 1174966SN/A Source('stacktrace.cc') 1184966SN/A Source('vtophys.cc') 1194966SN/A else: 1209885Sstever@gmail.com Source('process.cc') 1214966SN/A 1224966SN/A Source('linux/linux.cc') 1234966SN/A Source('linux/process.cc') 12411219Snilay@cs.wisc.edu Source('linux/syscalls.cc') 12511219Snilay@cs.wisc.edu 12611219Snilay@cs.wisc.edu python_files = ( 12711219Snilay@cs.wisc.edu '__init__.py', 12811219Snilay@cs.wisc.edu 'general_purpose/__init__.py', 12911219Snilay@cs.wisc.edu 'general_purpose/arithmetic/__init__.py', 13011219Snilay@cs.wisc.edu 'general_purpose/arithmetic/add_and_subtract.py', 13111219Snilay@cs.wisc.edu 'general_purpose/arithmetic/increment_and_decrement.py', 13211219Snilay@cs.wisc.edu 'general_purpose/arithmetic/multiply_and_divide.py', 13311219Snilay@cs.wisc.edu 'general_purpose/cache_and_memory_management.py', 13411219Snilay@cs.wisc.edu 'general_purpose/compare_and_test/__init__.py', 13511219Snilay@cs.wisc.edu 'general_purpose/compare_and_test/bit_scan.py', 13611219Snilay@cs.wisc.edu 'general_purpose/compare_and_test/bit_test.py', 13711219Snilay@cs.wisc.edu 'general_purpose/compare_and_test/bounds.py', 13811219Snilay@cs.wisc.edu 'general_purpose/compare_and_test/compare.py', 13911219Snilay@cs.wisc.edu 'general_purpose/compare_and_test/set_byte_on_condition.py', 14011219Snilay@cs.wisc.edu 'general_purpose/compare_and_test/test.py', 14111219Snilay@cs.wisc.edu 'general_purpose/control_transfer/__init__.py', 14211219Snilay@cs.wisc.edu 'general_purpose/control_transfer/call.py', 14311219Snilay@cs.wisc.edu 'general_purpose/control_transfer/conditional_jump.py', 14411219Snilay@cs.wisc.edu 'general_purpose/control_transfer/interrupts_and_exceptions.py', 14511219Snilay@cs.wisc.edu 'general_purpose/control_transfer/jump.py', 14611219Snilay@cs.wisc.edu 'general_purpose/control_transfer/loop.py', 14711219Snilay@cs.wisc.edu 'general_purpose/control_transfer/xreturn.py', 14811219Snilay@cs.wisc.edu 'general_purpose/data_conversion/__init__.py', 14911219Snilay@cs.wisc.edu 'general_purpose/data_conversion/ascii_adjust.py', 15011219Snilay@cs.wisc.edu 'general_purpose/data_conversion/bcd_adjust.py', 15111219Snilay@cs.wisc.edu 'general_purpose/data_conversion/endian_conversion.py', 15211219Snilay@cs.wisc.edu 'general_purpose/data_conversion/extract_sign_mask.py', 15311219Snilay@cs.wisc.edu 'general_purpose/data_conversion/sign_extension.py', 15411219Snilay@cs.wisc.edu 'general_purpose/data_conversion/translate.py', 15511219Snilay@cs.wisc.edu 'general_purpose/data_transfer/__init__.py', 15611219Snilay@cs.wisc.edu 'general_purpose/data_transfer/conditional_move.py', 15711219Snilay@cs.wisc.edu 'general_purpose/data_transfer/move.py', 15811219Snilay@cs.wisc.edu 'general_purpose/data_transfer/stack_operations.py', 15911219Snilay@cs.wisc.edu 'general_purpose/data_transfer/xchg.py', 16011219Snilay@cs.wisc.edu 'general_purpose/flags/__init__.py', 16111219Snilay@cs.wisc.edu 'general_purpose/flags/load_and_store.py', 16211219Snilay@cs.wisc.edu 'general_purpose/flags/push_and_pop.py', 16311219Snilay@cs.wisc.edu 'general_purpose/flags/set_and_clear.py', 16411219Snilay@cs.wisc.edu 'general_purpose/input_output/__init__.py', 16511219Snilay@cs.wisc.edu 'general_purpose/input_output/general_io.py', 16611219Snilay@cs.wisc.edu 'general_purpose/input_output/string_io.py', 16711219Snilay@cs.wisc.edu 'general_purpose/load_effective_address.py', 16811219Snilay@cs.wisc.edu 'general_purpose/load_segment_registers.py', 16911219Snilay@cs.wisc.edu 'general_purpose/logical.py', 17011219Snilay@cs.wisc.edu 'general_purpose/no_operation.py', 17111219Snilay@cs.wisc.edu 'general_purpose/processor_information.py', 17211219Snilay@cs.wisc.edu 'general_purpose/rotate_and_shift/__init__.py', 17311219Snilay@cs.wisc.edu 'general_purpose/rotate_and_shift/rotate.py', 17411219Snilay@cs.wisc.edu 'general_purpose/rotate_and_shift/shift.py', 17511219Snilay@cs.wisc.edu 'general_purpose/semaphores.py', 17611219Snilay@cs.wisc.edu 'general_purpose/string/__init__.py', 17711219Snilay@cs.wisc.edu 'general_purpose/string/compare_strings.py', 17811219Snilay@cs.wisc.edu 'general_purpose/string/load_string.py', 17911219Snilay@cs.wisc.edu 'general_purpose/string/move_string.py', 18011219Snilay@cs.wisc.edu 'general_purpose/string/scan_string.py', 18111219Snilay@cs.wisc.edu 'general_purpose/string/store_string.py', 18211219Snilay@cs.wisc.edu 'general_purpose/system_calls.py', 18311219Snilay@cs.wisc.edu 'system/__init__.py', 18411219Snilay@cs.wisc.edu 'system/halt.py', 18511219Snilay@cs.wisc.edu 'system/undefined_operation.py', 18611219Snilay@cs.wisc.edu 'system/msrs.py', 18711219Snilay@cs.wisc.edu 'simd128/__init__.py', 18811219Snilay@cs.wisc.edu 'simd128/integer/__init__.py', 18911219Snilay@cs.wisc.edu 'simd128/integer/data_transfer/__init__.py', 19011219Snilay@cs.wisc.edu 'simd128/integer/data_transfer/move.py', 19111219Snilay@cs.wisc.edu 'simd128/integer/data_transfer/move_non_temporal.py', 19211219Snilay@cs.wisc.edu 'simd128/integer/data_transfer/move_mask.py', 19311219Snilay@cs.wisc.edu 'simd128/integer/data_conversion/__init__.py', 19411219Snilay@cs.wisc.edu 'simd128/integer/data_conversion/convert_mmx_integer_to_floating_point.py', 19511219Snilay@cs.wisc.edu 'simd128/integer/data_conversion/convert_integer_to_floating_point.py', 19611219Snilay@cs.wisc.edu 'simd128/integer/data_conversion/convert_gpr_integer_to_floating_point.py', 19711219Snilay@cs.wisc.edu 'simd128/integer/data_reordering/__init__.py', 19811219Snilay@cs.wisc.edu 'simd128/integer/data_reordering/unpack_and_interleave.py', 19911219Snilay@cs.wisc.edu 'simd128/integer/data_reordering/pack_with_saturation.py', 20011219Snilay@cs.wisc.edu 'simd128/integer/data_reordering/extract_and_insert.py', 20111219Snilay@cs.wisc.edu 'simd128/integer/data_reordering/shuffle.py', 20211219Snilay@cs.wisc.edu 'simd128/integer/arithmetic/__init__.py', 20311219Snilay@cs.wisc.edu 'simd128/integer/arithmetic/subtraction.py', 20411219Snilay@cs.wisc.edu 'simd128/integer/arithmetic/addition.py', 20511219Snilay@cs.wisc.edu 'simd128/integer/arithmetic/multiplication.py', 20611219Snilay@cs.wisc.edu 'simd128/integer/arithmetic/multiply_add.py', 20711219Snilay@cs.wisc.edu 'simd128/integer/arithmetic/average.py', 20811219Snilay@cs.wisc.edu 'simd128/integer/arithmetic/sum_of_absolute_differences.py', 20911219Snilay@cs.wisc.edu 'simd128/integer/shift/__init__.py', 21011219Snilay@cs.wisc.edu 'simd128/integer/shift/right_arithmetic_shift.py', 21111219Snilay@cs.wisc.edu 'simd128/integer/shift/left_logical_shift.py', 21211219Snilay@cs.wisc.edu 'simd128/integer/shift/right_logical_shift.py', 21311219Snilay@cs.wisc.edu 'simd128/integer/compare/__init__.py', 21411219Snilay@cs.wisc.edu 'simd128/integer/compare/compare_and_write_mask.py', 21511219Snilay@cs.wisc.edu 'simd128/integer/compare/compare_and_write_minimum_or_maximum.py', 21611219Snilay@cs.wisc.edu 'simd128/integer/logical/__init__.py', 21711219Snilay@cs.wisc.edu 'simd128/integer/logical/pand.py', 21811219Snilay@cs.wisc.edu 'simd128/integer/logical/por.py', 21911219Snilay@cs.wisc.edu 'simd128/integer/logical/exclusive_or.py', 22011219Snilay@cs.wisc.edu 'simd128/integer/save_and_restore_state/__init__.py', 22111219Snilay@cs.wisc.edu 'simd128/integer/save_and_restore_state/save_and_restore_state.py', 22211219Snilay@cs.wisc.edu 'simd128/integer/save_and_restore_state/save_and_restore_control_and_status.py', 22311219Snilay@cs.wisc.edu 'simd128/floating_point/__init__.py', 22411219Snilay@cs.wisc.edu 'simd128/floating_point/data_transfer/__init__.py', 22511219Snilay@cs.wisc.edu 'simd128/floating_point/data_transfer/move_mask.py', 22611219Snilay@cs.wisc.edu 'simd128/floating_point/data_transfer/move.py', 22711219Snilay@cs.wisc.edu 'simd128/floating_point/data_transfer/move_with_duplication.py', 22811219Snilay@cs.wisc.edu 'simd128/floating_point/data_transfer/move_non_temporal.py', 22911219Snilay@cs.wisc.edu 'simd128/floating_point/data_conversion/__init__.py', 230 'simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py', 231 'simd128/floating_point/data_conversion/convert_floating_point_to_xmm_integer.py', 232 'simd128/floating_point/data_conversion/convert_floating_point_to_mmx_integer.py', 233 'simd128/floating_point/data_conversion/convert_floating_point_to_gpr_integer.py', 234 'simd128/floating_point/data_reordering/__init__.py', 235 'simd128/floating_point/data_reordering/unpack_and_interleave.py', 236 'simd128/floating_point/data_reordering/shuffle.py', 237 'simd128/floating_point/arithmetic/__init__.py', 238 'simd128/floating_point/arithmetic/subtraction.py', 239 'simd128/floating_point/arithmetic/addition.py', 240 'simd128/floating_point/arithmetic/horizontal_subtraction.py', 241 'simd128/floating_point/arithmetic/horizontal_addition.py', 242 'simd128/floating_point/arithmetic/square_root.py', 243 'simd128/floating_point/arithmetic/simultaneous_addition_and_subtraction.py', 244 'simd128/floating_point/arithmetic/multiplication.py', 245 'simd128/floating_point/arithmetic/division.py', 246 'simd128/floating_point/arithmetic/reciprocal_square_root.py', 247 'simd128/floating_point/arithmetic/reciprocal_estimation.py', 248 'simd128/floating_point/compare/__init__.py', 249 'simd128/floating_point/compare/compare_and_write_mask.py', 250 'simd128/floating_point/compare/compare_and_write_rflags.py', 251 'simd128/floating_point/compare/compare_and_write_minimum_or_maximum.py', 252 'simd128/floating_point/logical/__init__.py', 253 'simd128/floating_point/logical/andp.py', 254 'simd128/floating_point/logical/orp.py', 255 'simd128/floating_point/logical/exclusive_or.py', 256 'simd64/__init__.py', 257 'simd64/integer/__init__.py', 258 'simd64/integer/data_transfer/__init__.py', 259 'simd64/integer/data_transfer/move_mask.py', 260 'simd64/integer/data_transfer/move.py', 261 'simd64/integer/data_transfer/move_non_temporal.py', 262 'simd64/integer/exit_media_state.py', 263 'simd64/integer/data_reordering/__init__.py', 264 'simd64/integer/data_reordering/unpack_and_interleave.py', 265 'simd64/integer/data_reordering/pack_with_saturation.py', 266 'simd64/integer/data_reordering/extract_and_insert.py', 267 'simd64/integer/data_reordering/shuffle_and_swap.py', 268 'simd64/integer/data_conversion.py', 269 'simd64/integer/arithmetic/__init__.py', 270 'simd64/integer/arithmetic/subtraction.py', 271 'simd64/integer/arithmetic/addition.py', 272 'simd64/integer/arithmetic/multiplication.py', 273 'simd64/integer/arithmetic/multiply_add.py', 274 'simd64/integer/arithmetic/average.py', 275 'simd64/integer/arithmetic/sum_of_absolute_differences.py', 276 'simd64/integer/shift/__init__.py', 277 'simd64/integer/shift/right_arithmetic_shift.py', 278 'simd64/integer/shift/left_logical_shift.py', 279 'simd64/integer/shift/right_logical_shift.py', 280 'simd64/integer/compare/__init__.py', 281 'simd64/integer/compare/compare_and_write_mask.py', 282 'simd64/integer/compare/compare_and_write_minimum_or_maximum.py', 283 'simd64/integer/logical/__init__.py', 284 'simd64/integer/logical/pand.py', 285 'simd64/integer/logical/por.py', 286 'simd64/integer/logical/exclusive_or.py', 287 'simd64/integer/save_and_restore_state.py', 288 'simd64/floating_point/__init__.py', 289 'simd64/floating_point/arithmetic/__init__.py', 290 'simd64/floating_point/arithmetic/subtraction.py', 291 'simd64/floating_point/arithmetic/addition.py', 292 'simd64/floating_point/arithmetic/reciprocal_estimation.py', 293 'simd64/floating_point/arithmetic/multiplication.py', 294 'simd64/floating_point/arithmetic/accumulation.py', 295 'simd64/floating_point/arithmetic/reciprocal_square_root.py', 296 'simd64/floating_point/data_conversion.py', 297 'simd64/floating_point/compare/__init__.py', 298 'simd64/floating_point/compare/compare_and_write_mask.py', 299 'simd64/floating_point/compare/compare_and_write_minimum_or_maximum.py', 300 'x87/__init__.py', 301 'x87/data_transfer_and_conversion/__init__.py', 302 'x87/data_transfer_and_conversion/convert_and_load_or_store_integer.py', 303 'x87/data_transfer_and_conversion/load_or_store_floating_point.py', 304 'x87/data_transfer_and_conversion/exchange.py', 305 'x87/data_transfer_and_conversion/convert_and_load_or_store_bcd.py', 306 'x87/data_transfer_and_conversion/conditional_move.py', 307 'x87/data_transfer_and_conversion/extract.py', 308 'x87/load_constants/__init__.py', 309 'x87/load_constants/load_0_1_or_pi.py', 310 'x87/load_constants/load_logarithm.py', 311 'x87/arithmetic/__init__.py', 312 'x87/arithmetic/subtraction.py', 313 'x87/arithmetic/addition.py', 314 'x87/arithmetic/partial_remainder.py', 315 'x87/arithmetic/multiplication.py', 316 'x87/arithmetic/division.py', 317 'x87/arithmetic/change_sign.py', 318 'x87/arithmetic/round.py', 319 'x87/arithmetic/square_root.py', 320 'x87/transcendental_functions/__init__.py', 321 'x87/transcendental_functions/trigonometric_functions.py', 322 'x87/transcendental_functions/logarithmic_functions.py', 323 'x87/compare_and_test/__init__.py', 324 'x87/compare_and_test/classify.py', 325 'x87/compare_and_test/test.py', 326 'x87/compare_and_test/floating_point_ordered_compare.py', 327 'x87/compare_and_test/floating_point_unordered_compare.py', 328 'x87/compare_and_test/integer_compare.py', 329 'x87/stack_management/__init__.py', 330 'x87/stack_management/stack_control.py', 331 'x87/stack_management/clear_state.py', 332 'x87/control/__init__.py', 333 'x87/control/clear_exceptions.py', 334 'x87/control/initialize.py', 335 'x87/control/wait_for_exceptions.py', 336 'x87/control/save_x87_status_word.py', 337 'x87/control/save_and_restore_x87_control_word.py', 338 'x87/control/save_and_restore_x87_environment.py', 339 'x87/no_operation.py' 340 ) 341 342 343 # Add in files generated by the ISA description. 344 isa_desc_files = env.ISADesc('isa/main.isa') 345 for f in isa_desc_files: 346 # Add in python file dependencies that won't be caught otherwise 347 for pyfile in python_files: 348 env.Depends(f, "isa/insts/%s" % pyfile) 349 # Only non-header files need to be compiled. 350 if not f.path.endswith('.hh'): 351 Source(f) 352