SConscript revision 5131
12139SN/A# -*- mode:python -*- 22139SN/A 32139SN/A# Copyright (c) 2005-2006 The Regents of The University of Michigan 42139SN/A# All rights reserved. 52139SN/A# 62139SN/A# Redistribution and use in source and binary forms, with or without 72139SN/A# modification, are permitted provided that the following conditions are 82139SN/A# met: redistributions of source code must retain the above copyright 92139SN/A# notice, this list of conditions and the following disclaimer; 102139SN/A# redistributions in binary form must reproduce the above copyright 112139SN/A# notice, this list of conditions and the following disclaimer in the 122139SN/A# documentation and/or other materials provided with the distribution; 132139SN/A# neither the name of the copyright holders nor the names of its 142139SN/A# contributors may be used to endorse or promote products derived from 152139SN/A# this software without specific prior written permission. 162139SN/A# 172139SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 182139SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 192139SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 202139SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 212139SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 222139SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 232139SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242139SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252139SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 262139SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 272139SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282665Ssaidi@eecs.umich.edu# 292665Ssaidi@eecs.umich.edu# Authors: Gabe Black 302139SN/A 314202Sbinkertn@umich.edu# Copyright (c) 2007 The Hewlett-Packard Development Company 328961Sgblack@eecs.umich.edu# All rights reserved. 3310196SCurtis.Dunham@arm.com# 342139SN/A# Redistribution and use of this software in source and binary forms, 354202Sbinkertn@umich.edu# with or without modification, are permitted provided that the 362152SN/A# following conditions are met: 372152SN/A# 382139SN/A# The software must be used only for Non-Commercial Use which means any 392139SN/A# use which is NOT directed to receiving any direct monetary 402139SN/A# compensation for, or commercial advantage from such use. Illustrative 412139SN/A# examples of non-commercial use are academic research, personal study, 422139SN/A# teaching, education and corporate research & development. 432152SN/A# Illustrative examples of commercial use are distributing products for 442152SN/A# commercial advantage and providing services using the software for 452139SN/A# commercial advantage. 462139SN/A# 472139SN/A# If you wish to use this software or functionality therein that may be 489020Sgblack@eecs.umich.edu# covered by patents for commercial use, please contact: 494781Snate@binkert.org# Director of Intellectual Property Licensing 507799Sgblack@eecs.umich.edu# Office of Strategy and Technology 514781Snate@binkert.org# Hewlett-Packard Company 524781Snate@binkert.org# 1501 Page Mill Road 533170Sstever@eecs.umich.edu# Palo Alto, California 94304 545664Sgblack@eecs.umich.edu# 558105Sgblack@eecs.umich.edu# Redistributions of source code must retain the above copyright notice, 566179Sksewell@umich.edu# this list of conditions and the following disclaimer. Redistributions 574781Snate@binkert.org# in binary form must reproduce the above copyright notice, this list of 5810553Salexandru.dutu@amd.com# conditions and the following disclaimer in the documentation and/or 596329Sgblack@eecs.umich.edu# other materials provided with the distribution. Neither the name of 604781Snate@binkert.org# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 614781Snate@binkert.org# contributors may be used to endorse or promote products derived from 624781Snate@binkert.org# this software without specific prior written permission. No right of 634781Snate@binkert.org# sublicense is granted herewith. Derivatives of the software and 644781Snate@binkert.org# output created using the software may be prepared, but only for 654781Snate@binkert.org# Non-Commercial Uses. Derivatives of the software may be shared with 662139SN/A# others provided: (i) the others agree to abide by the list of 672139SN/A# conditions herein which includes the Non-Commercial Use restrictions; 683546Sgblack@eecs.umich.edu# and (ii) such Derivatives of the software include the above copyright 694202Sbinkertn@umich.edu# notice to acknowledge the contribution from this software where 702152SN/A# applicable, this list of conditions and the disclaimer below. 7111308Santhony.gutierrez@amd.com# 7211308Santhony.gutierrez@amd.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7311308Santhony.gutierrez@amd.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7411308Santhony.gutierrez@amd.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7511308Santhony.gutierrez@amd.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7611308Santhony.gutierrez@amd.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7711308Santhony.gutierrez@amd.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7811308Santhony.gutierrez@amd.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 792152SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 802152SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 812152SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 822152SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 832152SN/A# 842152SN/A# Authors: Gabe Black 852152SN/A 862152SN/AImport('*') 872152SN/A 882152SN/Aif env['TARGET_ISA'] == 'x86': 892152SN/A Source('emulenv.cc') 902504SN/A Source('floatregfile.cc') 912504SN/A Source('faults.cc') 922504SN/A Source('insts/microfpop.cc') 932504SN/A Source('insts/microldstop.cc') 942152SN/A Source('insts/microop.cc') 952504SN/A Source('insts/microregop.cc') 962152SN/A Source('insts/static_inst.cc') 972152SN/A Source('intregfile.cc') 982152SN/A Source('miscregfile.cc') 992152SN/A Source('pagetable.cc') 1002152SN/A Source('predecoder.cc') 1012152SN/A Source('predecoder_tables.cc') 1028584Sgblack@eecs.umich.edu Source('regfile.cc') 1038584Sgblack@eecs.umich.edu Source('remote_gdb.cc') 1046993Snate@binkert.org Source('tlb.cc') 1056993Snate@binkert.org 1066993Snate@binkert.org SimObject('X86TLB.py') 1078584Sgblack@eecs.umich.edu 10810319SAndreas.Sandberg@ARM.com if env['FULL_SYSTEM']: 10910319SAndreas.Sandberg@ARM.com # Full-system sources 11010319SAndreas.Sandberg@ARM.com Source('stacktrace.cc') 11110319SAndreas.Sandberg@ARM.com Source('utility.cc') 1128584Sgblack@eecs.umich.edu Source('vtophys.cc') 11310196SCurtis.Dunham@arm.com else: 11410196SCurtis.Dunham@arm.com Source('process.cc') 11510196SCurtis.Dunham@arm.com 11610196SCurtis.Dunham@arm.com Source('linux/linux.cc') 11710196SCurtis.Dunham@arm.com Source('linux/process.cc') 11810196SCurtis.Dunham@arm.com Source('linux/syscalls.cc') 11910196SCurtis.Dunham@arm.com 12010196SCurtis.Dunham@arm.com python_files = ( 12110196SCurtis.Dunham@arm.com '__init__.py', 12210196SCurtis.Dunham@arm.com 'general_purpose/__init__.py', 12310196SCurtis.Dunham@arm.com 'general_purpose/arithmetic/__init__.py', 12410196SCurtis.Dunham@arm.com 'general_purpose/arithmetic/add_and_subtract.py', 12510196SCurtis.Dunham@arm.com 'general_purpose/arithmetic/increment_and_decrement.py', 12610196SCurtis.Dunham@arm.com 'general_purpose/arithmetic/multiply_and_divide.py', 12710196SCurtis.Dunham@arm.com 'general_purpose/cache_and_memory_management.py', 12810196SCurtis.Dunham@arm.com 'general_purpose/compare_and_test/__init__.py', 12910196SCurtis.Dunham@arm.com 'general_purpose/compare_and_test/bit_scan.py', 13010196SCurtis.Dunham@arm.com 'general_purpose/compare_and_test/bit_test.py', 13110196SCurtis.Dunham@arm.com 'general_purpose/compare_and_test/bounds.py', 13210196SCurtis.Dunham@arm.com 'general_purpose/compare_and_test/compare.py', 13310196SCurtis.Dunham@arm.com 'general_purpose/compare_and_test/set_byte_on_condition.py', 1346993Snate@binkert.org 'general_purpose/compare_and_test/test.py', 1356993Snate@binkert.org 'general_purpose/control_transfer/__init__.py', 1366993Snate@binkert.org 'general_purpose/control_transfer/call.py', 1376998Snate@binkert.org 'general_purpose/control_transfer/conditional_jump.py', 1386998Snate@binkert.org 'general_purpose/control_transfer/interrupts_and_exceptions.py', 1396998Snate@binkert.org 'general_purpose/control_transfer/jump.py', 1407756SAli.Saidi@ARM.com 'general_purpose/control_transfer/loop.py', 1416993Snate@binkert.org 'general_purpose/control_transfer/xreturn.py', 1426993Snate@binkert.org 'general_purpose/data_conversion/__init__.py', 1436993Snate@binkert.org 'general_purpose/data_conversion/ascii_adjust.py', 1446993Snate@binkert.org 'general_purpose/data_conversion/bcd_adjust.py', 1458585Sgblack@eecs.umich.edu 'general_purpose/data_conversion/endian_conversion.py', 1468584Sgblack@eecs.umich.edu 'general_purpose/data_conversion/extract_sign_mask.py', 14710319SAndreas.Sandberg@ARM.com 'general_purpose/data_conversion/sign_extension.py', 1486993Snate@binkert.org 'general_purpose/data_conversion/translate.py', 1497816Ssteve.reinhardt@amd.com 'general_purpose/data_transfer/__init__.py', 1502152SN/A 'general_purpose/data_transfer/conditional_move.py', 1512766Sktlim@umich.edu 'general_purpose/data_transfer/move.py', 1522766Sktlim@umich.edu 'general_purpose/data_transfer/stack_operations.py', 1536993Snate@binkert.org 'general_purpose/data_transfer/xchg.py', 1542152SN/A 'general_purpose/flags/__init__.py', 1552152SN/A 'general_purpose/flags/load_and_store.py', 1565944Sgblack@eecs.umich.edu 'general_purpose/flags/push_and_pop.py', 15710196SCurtis.Dunham@arm.com 'general_purpose/flags/set_and_clear.py', 15810196SCurtis.Dunham@arm.com 'general_purpose/input_output/__init__.py', 15910196SCurtis.Dunham@arm.com 'general_purpose/input_output/general_io.py', 16010196SCurtis.Dunham@arm.com 'general_purpose/input_output/string_io.py', 16110196SCurtis.Dunham@arm.com 'general_purpose/load_effective_address.py', 16210196SCurtis.Dunham@arm.com 'general_purpose/load_segment_registers.py', 16310196SCurtis.Dunham@arm.com 'general_purpose/logical.py', 16410196SCurtis.Dunham@arm.com 'general_purpose/no_operation.py', 16510196SCurtis.Dunham@arm.com 'general_purpose/processor_information.py', 16610196SCurtis.Dunham@arm.com 'general_purpose/rotate_and_shift/__init__.py', 16710196SCurtis.Dunham@arm.com 'general_purpose/rotate_and_shift/rotate.py', 16810196SCurtis.Dunham@arm.com 'general_purpose/rotate_and_shift/shift.py', 16910196SCurtis.Dunham@arm.com 'general_purpose/semaphores.py', 17010196SCurtis.Dunham@arm.com 'general_purpose/string/__init__.py', 17110196SCurtis.Dunham@arm.com 'general_purpose/string/compare_strings.py', 17210196SCurtis.Dunham@arm.com 'general_purpose/string/load_string.py', 17310196SCurtis.Dunham@arm.com 'general_purpose/string/move_string.py', 17410196SCurtis.Dunham@arm.com 'general_purpose/string/scan_string.py', 17510196SCurtis.Dunham@arm.com 'general_purpose/string/store_string.py', 17610196SCurtis.Dunham@arm.com 'general_purpose/system_calls.py', 17710196SCurtis.Dunham@arm.com 'system/__init__.py', 17810196SCurtis.Dunham@arm.com 'system/undefined_operation.py', 17910196SCurtis.Dunham@arm.com 'simd128/__init__.py', 18010196SCurtis.Dunham@arm.com 'simd128/integer/__init__.py', 18110196SCurtis.Dunham@arm.com 'simd128/integer/data_transfer/__init__.py', 18210196SCurtis.Dunham@arm.com 'simd128/integer/data_transfer/move.py', 18310196SCurtis.Dunham@arm.com 'simd128/integer/data_transfer/move_non_temporal.py', 18410196SCurtis.Dunham@arm.com 'simd128/integer/data_transfer/move_mask.py', 18510196SCurtis.Dunham@arm.com 'simd128/integer/data_conversion/__init__.py', 18610196SCurtis.Dunham@arm.com 'simd128/integer/data_conversion/convert_mmx_integer_to_floating_point.py', 18710196SCurtis.Dunham@arm.com 'simd128/integer/data_conversion/convert_integer_to_floating_point.py', 18810196SCurtis.Dunham@arm.com 'simd128/integer/data_conversion/convert_gpr_integer_to_floating_point.py', 18910196SCurtis.Dunham@arm.com 'simd128/integer/data_reordering/__init__.py', 19010196SCurtis.Dunham@arm.com 'simd128/integer/data_reordering/unpack_and_interleave.py', 19110196SCurtis.Dunham@arm.com 'simd128/integer/data_reordering/pack_with_saturation.py', 19210196SCurtis.Dunham@arm.com 'simd128/integer/data_reordering/extract_and_insert.py', 19310196SCurtis.Dunham@arm.com 'simd128/integer/data_reordering/shuffle.py', 19410196SCurtis.Dunham@arm.com 'simd128/integer/arithmetic/__init__.py', 19510196SCurtis.Dunham@arm.com 'simd128/integer/arithmetic/subtraction.py', 19610196SCurtis.Dunham@arm.com 'simd128/integer/arithmetic/addition.py', 19710196SCurtis.Dunham@arm.com 'simd128/integer/arithmetic/multiplication.py', 19810196SCurtis.Dunham@arm.com 'simd128/integer/arithmetic/multiply_add.py', 19910196SCurtis.Dunham@arm.com 'simd128/integer/arithmetic/average.py', 20010196SCurtis.Dunham@arm.com 'simd128/integer/arithmetic/sum_of_absolute_differences.py', 20110196SCurtis.Dunham@arm.com 'simd128/integer/shift/__init__.py', 20210196SCurtis.Dunham@arm.com 'simd128/integer/shift/right_arithmetic_shift.py', 20310196SCurtis.Dunham@arm.com 'simd128/integer/shift/left_logical_shift.py', 2048335Snate@binkert.org 'simd128/integer/shift/right_logical_shift.py', 2058335Snate@binkert.org 'simd128/integer/compare/__init__.py', 2069920Syasuko.eckert@amd.com 'simd128/integer/compare/compare_and_write_mask.py', 2078335Snate@binkert.org 'simd128/integer/compare/compare_and_write_minimum_or_maximum.py', 20810935Snilay@cs.wisc.edu 'simd128/integer/logical/__init__.py', 209 'simd128/integer/logical/pand.py', 210 'simd128/integer/logical/por.py', 211 'simd128/integer/logical/exclusive_or.py', 212 'simd128/integer/save_and_restore_state/__init__.py', 213 'simd128/integer/save_and_restore_state/save_and_restore_state.py', 214 'simd128/integer/save_and_restore_state/save_and_restore_control_and_status.py', 215 'simd128/floating_point/__init__.py', 216 'simd128/floating_point/data_transfer/__init__.py', 217 'simd128/floating_point/data_transfer/move_mask.py', 218 'simd128/floating_point/data_transfer/move.py', 219 'simd128/floating_point/data_transfer/move_with_duplication.py', 220 'simd128/floating_point/data_transfer/move_non_temporal.py', 221 'simd128/floating_point/data_conversion/__init__.py', 222 'simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py', 223 'simd128/floating_point/data_conversion/convert_floating_point_to_xmm_integer.py', 224 'simd128/floating_point/data_conversion/convert_floating_point_to_mmx_integer.py', 225 'simd128/floating_point/data_conversion/convert_floating_point_to_gpr_integer.py', 226 'simd128/floating_point/data_reordering/__init__.py', 227 'simd128/floating_point/data_reordering/unpack_and_interleave.py', 228 'simd128/floating_point/data_reordering/shuffle.py', 229 'simd128/floating_point/arithmetic/__init__.py', 230 'simd128/floating_point/arithmetic/subtraction.py', 231 'simd128/floating_point/arithmetic/addition.py', 232 'simd128/floating_point/arithmetic/horizontal_subtraction.py', 233 'simd128/floating_point/arithmetic/horizontal_addition.py', 234 'simd128/floating_point/arithmetic/square_root.py', 235 'simd128/floating_point/arithmetic/simultaneous_addition_and_subtraction.py', 236 'simd128/floating_point/arithmetic/multiplication.py', 237 'simd128/floating_point/arithmetic/division.py', 238 'simd128/floating_point/arithmetic/reciprocal_square_root.py', 239 'simd128/floating_point/arithmetic/reciprocal_estimation.py', 240 'simd128/floating_point/compare/__init__.py', 241 'simd128/floating_point/compare/compare_and_write_mask.py', 242 'simd128/floating_point/compare/compare_and_write_rflags.py', 243 'simd128/floating_point/compare/compare_and_write_minimum_or_maximum.py', 244 'simd128/floating_point/logical/__init__.py', 245 'simd128/floating_point/logical/andp.py', 246 'simd128/floating_point/logical/orp.py', 247 'simd128/floating_point/logical/exclusive_or.py', 248 'simd64/__init__.py', 249 'simd64/integer/__init__.py', 250 'simd64/integer/data_transfer/__init__.py', 251 'simd64/integer/data_transfer/move_mask.py', 252 'simd64/integer/data_transfer/move.py', 253 'simd64/integer/data_transfer/move_non_temporal.py', 254 'simd64/integer/exit_media_state.py', 255 'simd64/integer/data_reordering/__init__.py', 256 'simd64/integer/data_reordering/unpack_and_interleave.py', 257 'simd64/integer/data_reordering/pack_with_saturation.py', 258 'simd64/integer/data_reordering/extract_and_insert.py', 259 'simd64/integer/data_reordering/shuffle_and_swap.py', 260 'simd64/integer/data_conversion.py', 261 'simd64/integer/arithmetic/__init__.py', 262 'simd64/integer/arithmetic/subtraction.py', 263 'simd64/integer/arithmetic/addition.py', 264 'simd64/integer/arithmetic/multiplication.py', 265 'simd64/integer/arithmetic/multiply_add.py', 266 'simd64/integer/arithmetic/average.py', 267 'simd64/integer/arithmetic/sum_of_absolute_differences.py', 268 'simd64/integer/shift/__init__.py', 269 'simd64/integer/shift/right_arithmetic_shift.py', 270 'simd64/integer/shift/left_logical_shift.py', 271 'simd64/integer/shift/right_logical_shift.py', 272 'simd64/integer/compare/__init__.py', 273 'simd64/integer/compare/compare_and_write_mask.py', 274 'simd64/integer/compare/compare_and_write_minimum_or_maximum.py', 275 'simd64/integer/logical/__init__.py', 276 'simd64/integer/logical/pand.py', 277 'simd64/integer/logical/por.py', 278 'simd64/integer/logical/exclusive_or.py', 279 'simd64/integer/save_and_restore_state.py', 280 'simd64/floating_point/__init__.py', 281 'simd64/floating_point/arithmetic/__init__.py', 282 'simd64/floating_point/arithmetic/subtraction.py', 283 'simd64/floating_point/arithmetic/addition.py', 284 'simd64/floating_point/arithmetic/reciprocal_estimation.py', 285 'simd64/floating_point/arithmetic/multiplication.py', 286 'simd64/floating_point/arithmetic/accumulation.py', 287 'simd64/floating_point/arithmetic/reciprocal_square_root.py', 288 'simd64/floating_point/data_conversion.py', 289 'simd64/floating_point/compare/__init__.py', 290 'simd64/floating_point/compare/compare_and_write_mask.py', 291 'simd64/floating_point/compare/compare_and_write_minimum_or_maximum.py', 292 'x87/__init__.py', 293 'x87/data_transfer_and_conversion/__init__.py', 294 'x87/data_transfer_and_conversion/convert_and_load_or_store_integer.py', 295 'x87/data_transfer_and_conversion/load_or_store_floating_point.py', 296 'x87/data_transfer_and_conversion/exchange.py', 297 'x87/data_transfer_and_conversion/convert_and_load_or_store_bcd.py', 298 'x87/data_transfer_and_conversion/conditional_move.py', 299 'x87/data_transfer_and_conversion/extract.py', 300 'x87/load_constants/__init__.py', 301 'x87/load_constants/load_0_1_or_pi.py', 302 'x87/load_constants/load_logarithm.py', 303 'x87/arithmetic/__init__.py', 304 'x87/arithmetic/subtraction.py', 305 'x87/arithmetic/addition.py', 306 'x87/arithmetic/partial_remainder.py', 307 'x87/arithmetic/multiplication.py', 308 'x87/arithmetic/division.py', 309 'x87/arithmetic/change_sign.py', 310 'x87/arithmetic/round.py', 311 'x87/arithmetic/square_root.py', 312 'x87/transcendental_functions/__init__.py', 313 'x87/transcendental_functions/trigonometric_functions.py', 314 'x87/transcendental_functions/logarithmic_functions.py', 315 'x87/compare_and_test/__init__.py', 316 'x87/compare_and_test/classify.py', 317 'x87/compare_and_test/test.py', 318 'x87/compare_and_test/floating_point_ordered_compare.py', 319 'x87/compare_and_test/floating_point_unordered_compare.py', 320 'x87/compare_and_test/integer_compare.py', 321 'x87/stack_management/__init__.py', 322 'x87/stack_management/stack_control.py', 323 'x87/stack_management/clear_state.py', 324 'x87/control/__init__.py', 325 'x87/control/clear_exceptions.py', 326 'x87/control/initialize.py', 327 'x87/control/wait_for_exceptions.py', 328 'x87/control/save_x87_status_word.py', 329 'x87/control/save_and_restore_x87_control_word.py', 330 'x87/control/save_and_restore_x87_environment.py', 331 'x87/no_operation.py' 332 ) 333 334 335 # Add in files generated by the ISA description. 336 isa_desc_files = env.ISADesc('isa/main.isa') 337 for f in isa_desc_files: 338 # Add in python file dependencies that won't be caught otherwise 339 for pyfile in python_files: 340 env.Depends(f, "isa/insts/%s" % pyfile) 341 # Only non-header files need to be compiled. 342 if not f.path.endswith('.hh'): 343 Source(f) 344