SConscript revision 8740:253aeee61e66
11689SN/A# -*- mode:python -*-
22326SN/A
31689SN/A# Copyright (c) 2007-2008 The Hewlett-Packard Development Company
41689SN/A# All rights reserved.
51689SN/A#
61689SN/A# The license below extends only to copyright in the software and shall
71689SN/A# not be construed as granting a license to any other intellectual
81689SN/A# property including but not limited to intellectual property relating
91689SN/A# to a hardware implementation of the functionality of the software
101689SN/A# licensed hereunder.  You may use the software subject to the license
111689SN/A# terms below provided that you ensure that this notice is replicated
121689SN/A# unmodified and in its entirety in all distributions of the software,
131689SN/A# modified or unmodified, in source code or in binary form.
141689SN/A#
151689SN/A# Copyright (c) 2005-2006 The Regents of The University of Michigan
161689SN/A# All rights reserved.
171689SN/A#
181689SN/A# Redistribution and use in source and binary forms, with or without
191689SN/A# modification, are permitted provided that the following conditions are
201689SN/A# met: redistributions of source code must retain the above copyright
211689SN/A# notice, this list of conditions and the following disclaimer;
221689SN/A# redistributions in binary form must reproduce the above copyright
231689SN/A# notice, this list of conditions and the following disclaimer in the
241689SN/A# documentation and/or other materials provided with the distribution;
251689SN/A# neither the name of the copyright holders nor the names of its
261689SN/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#
291689SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
301689SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
312292SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
322292SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
331060SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
341060SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
351061SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
361060SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
371061SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
381060SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
391062SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
407813Ssteve.reinhardt@amd.com#
416216Snate@binkert.org# Authors: Gabe Black
421061SN/A
432326SN/AImport('*')
442669Sktlim@umich.edu
455529Snate@binkert.orgif env['TARGET_ISA'] == 'x86':
461060SN/A    Source('cpuid.cc')
475529Snate@binkert.org    Source('emulenv.cc')
482292SN/A    Source('faults.cc')
492292SN/A    Source('insts/badmicroop.cc')
502292SN/A    Source('insts/microfpop.cc')
511060SN/A    Source('insts/microldstop.cc')
521689SN/A    Source('insts/micromediaop.cc')
531689SN/A    Source('insts/microop.cc')
541689SN/A    Source('insts/microregop.cc')
551689SN/A    Source('insts/static_inst.cc')
561060SN/A    Source('isa.cc')
571060SN/A    Source('nativetrace.cc')
581060SN/A    Source('pagetable.cc')
592292SN/A    Source('predecoder.cc')
602292SN/A    Source('predecoder_tables.cc')
612292SN/A    Source('remote_gdb.cc')
622292SN/A    Source('tlb.cc')
632292SN/A    Source('types.cc')
642292SN/A    Source('utility.cc')
652292SN/A
662292SN/A    SimObject('X86NativeTrace.py')
671060SN/A    SimObject('X86TLB.py')
681061SN/A
691060SN/A    DebugFlag('Faults', "Trace all faults/exceptions/traps")
701060SN/A    DebugFlag('Predecoder', "Predecoder debug output")
711060SN/A    DebugFlag('X86', "Generic X86 ISA debugging")
721060SN/A
732733Sktlim@umich.edu    if env['FULL_SYSTEM']:
741061SN/A        DebugFlag('LocalApic', "Local APIC debugging")
751060SN/A        DebugFlag('PageTableWalker', \
762292SN/A                  "Page table walker state machine debugging")
771061SN/A
781061SN/A        SimObject('X86LocalApic.py')
791061SN/A        SimObject('X86System.py')
801060SN/A
812292SN/A        # Full-system sources
821061SN/A        Source('interrupts.cc')
831060SN/A        Source('linux/system.cc')
842733Sktlim@umich.edu        Source('pagetable_walker.cc')
852292SN/A        Source('system.cc')
862292SN/A        Source('stacktrace.cc')
872292SN/A        Source('vtophys.cc')
882292SN/A    else:
892292SN/A        Source('process.cc')
902292SN/A
912292SN/A        Source('linux/linux.cc')
922292SN/A        Source('linux/process.cc')
932292SN/A        Source('linux/syscalls.cc')
942292SN/A
952292SN/A    python_files = (
962292SN/A        '__init__.py',
972292SN/A        'general_purpose/__init__.py',
982348SN/A        'general_purpose/arithmetic/__init__.py',
992348SN/A        'general_purpose/arithmetic/add_and_subtract.py',
1002348SN/A        'general_purpose/arithmetic/increment_and_decrement.py',
1012326SN/A        'general_purpose/arithmetic/multiply_and_divide.py',
1022326SN/A        'general_purpose/cache_and_memory_management.py',
1032292SN/A        'general_purpose/compare_and_test/__init__.py',
1042292SN/A        'general_purpose/compare_and_test/bit_scan.py',
1052292SN/A        'general_purpose/compare_and_test/bit_test.py',
1062292SN/A        'general_purpose/compare_and_test/bounds.py',
1072292SN/A        'general_purpose/compare_and_test/compare.py',
1082292SN/A        'general_purpose/compare_and_test/set_byte_on_condition.py',
1095336Shines@cs.fsu.edu        'general_purpose/compare_and_test/test.py',
1102326SN/A        'general_purpose/control_transfer/__init__.py',
1111060SN/A        'general_purpose/control_transfer/call.py',
1121060SN/A        'general_purpose/control_transfer/conditional_jump.py',
1132292SN/A        'general_purpose/control_transfer/interrupts_and_exceptions.py',
1145529Snate@binkert.org        'general_purpose/control_transfer/jump.py',
1151061SN/A        'general_purpose/control_transfer/loop.py',
1162292SN/A        'general_purpose/control_transfer/xreturn.py',
1172292SN/A        'general_purpose/data_conversion/__init__.py',
1181061SN/A        'general_purpose/data_conversion/ascii_adjust.py',
1192292SN/A        'general_purpose/data_conversion/bcd_adjust.py',
1202292SN/A        'general_purpose/data_conversion/endian_conversion.py',
1211060SN/A        'general_purpose/data_conversion/extract_sign_mask.py',
1222292SN/A        'general_purpose/data_conversion/sign_extension.py',
1231062SN/A        'general_purpose/data_conversion/translate.py',
1241062SN/A        'general_purpose/data_transfer/__init__.py',
1252348SN/A        'general_purpose/data_transfer/conditional_move.py',
1262307SN/A        'general_purpose/data_transfer/move.py',
1271060SN/A        'general_purpose/data_transfer/stack_operations.py',
1282292SN/A        'general_purpose/data_transfer/xchg.py',
1296221Snate@binkert.org        'general_purpose/flags/__init__.py',
1302292SN/A        'general_purpose/flags/load_and_store.py',
1312292SN/A        'general_purpose/flags/push_and_pop.py',
1321060SN/A        'general_purpose/flags/set_and_clear.py',
1331060SN/A        'general_purpose/input_output/__init__.py',
1342292SN/A        'general_purpose/input_output/general_io.py',
1351060SN/A        'general_purpose/input_output/string_io.py',
1361060SN/A        'general_purpose/load_effective_address.py',
1372348SN/A        'general_purpose/load_segment_registers.py',
1382307SN/A        'general_purpose/logical.py',
1392307SN/A        'general_purpose/no_operation.py',
1402348SN/A        'general_purpose/rotate_and_shift/__init__.py',
1412307SN/A        'general_purpose/rotate_and_shift/rotate.py',
1422307SN/A        'general_purpose/rotate_and_shift/shift.py',
1432348SN/A        'general_purpose/semaphores.py',
1442307SN/A        'general_purpose/string/__init__.py',
1452307SN/A        'general_purpose/string/compare_strings.py',
1462292SN/A        'general_purpose/string/load_string.py',
1476221Snate@binkert.org        'general_purpose/string/move_string.py',
1482292SN/A        'general_purpose/string/scan_string.py',
1492292SN/A        'general_purpose/string/store_string.py',
1502292SN/A        'general_purpose/system_calls.py',
1512292SN/A        'romutil.py',
1522292SN/A        'system/__init__.py',
1531060SN/A        'system/control_registers.py',
1541060SN/A        'system/halt.py',
1552292SN/A        'system/invlpg.py',
1566221Snate@binkert.org        'system/undefined_operation.py',
1572292SN/A        'system/msrs.py',
1582292SN/A        'system/segmentation.py',
1591060SN/A        'simd128/__init__.py',
1601060SN/A        'simd128/integer/__init__.py',
1612292SN/A        'simd128/integer/data_transfer/__init__.py',
1626221Snate@binkert.org        'simd128/integer/data_transfer/move.py',
1632292SN/A        'simd128/integer/data_transfer/move_non_temporal.py',
1642292SN/A        'simd128/integer/data_transfer/move_mask.py',
1652292SN/A        'simd128/integer/data_conversion/__init__.py',
1662292SN/A        'simd128/integer/data_conversion/convert_mmx_integer_to_floating_point.py',
1672292SN/A        'simd128/integer/data_conversion/convert_integer_to_floating_point.py',
1681061SN/A        'simd128/integer/data_conversion/convert_gpr_integer_to_floating_point.py',
1691060SN/A        'simd128/integer/data_reordering/__init__.py',
1702292SN/A        'simd128/integer/data_reordering/unpack_and_interleave.py',
1711061SN/A        'simd128/integer/data_reordering/pack_with_saturation.py',
1721061SN/A        'simd128/integer/data_reordering/extract_and_insert.py',
1732292SN/A        'simd128/integer/data_reordering/shuffle.py',
1742292SN/A        'simd128/integer/arithmetic/__init__.py',
1752292SN/A        'simd128/integer/arithmetic/subtraction.py',
1762292SN/A        'simd128/integer/arithmetic/addition.py',
1771060SN/A        'simd128/integer/arithmetic/multiplication.py',
1782348SN/A        'simd128/integer/arithmetic/multiply_add.py',
1792348SN/A        'simd128/integer/arithmetic/average.py',
1802348SN/A        'simd128/integer/arithmetic/sum_of_absolute_differences.py',
1812333SN/A        'simd128/integer/shift/__init__.py',
1822333SN/A        'simd128/integer/shift/right_arithmetic_shift.py',
1832292SN/A        'simd128/integer/shift/left_logical_shift.py',
1842326SN/A        'simd128/integer/shift/right_logical_shift.py',
1852326SN/A        'simd128/integer/compare/__init__.py',
1862292SN/A        'simd128/integer/compare/compare_and_write_mask.py',
1872326SN/A        'simd128/integer/compare/compare_and_write_minimum_or_maximum.py',
1882326SN/A        'simd128/integer/logical/__init__.py',
1891755SN/A        'simd128/integer/logical/pand.py',
1902292SN/A        'simd128/integer/logical/por.py',
1912292SN/A        'simd128/integer/logical/exclusive_or.py',
1922292SN/A        'simd128/integer/save_and_restore_state/__init__.py',
1932292SN/A        'simd128/integer/save_and_restore_state/save_and_restore_state.py',
1942292SN/A        'simd128/integer/save_and_restore_state/save_and_restore_control_and_status.py',
1952292SN/A        'simd128/floating_point/__init__.py',
1962292SN/A        'simd128/floating_point/data_transfer/__init__.py',
1971060SN/A        'simd128/floating_point/data_transfer/move_mask.py',
1981060SN/A        'simd128/floating_point/data_transfer/move.py',
1992292SN/A        'simd128/floating_point/data_transfer/move_with_duplication.py',
2001061SN/A        'simd128/floating_point/data_transfer/move_non_temporal.py',
2011061SN/A        'simd128/floating_point/data_conversion/__init__.py',
2022292SN/A        'simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py',
2032292SN/A        'simd128/floating_point/data_conversion/convert_floating_point_to_xmm_integer.py',
2042292SN/A        'simd128/floating_point/data_conversion/convert_floating_point_to_mmx_integer.py',
2052292SN/A        'simd128/floating_point/data_conversion/convert_floating_point_to_gpr_integer.py',
2066221Snate@binkert.org        'simd128/floating_point/data_reordering/__init__.py',
2071061SN/A        'simd128/floating_point/data_reordering/unpack_and_interleave.py',
2082292SN/A        'simd128/floating_point/data_reordering/shuffle.py',
2092301SN/A        'simd128/floating_point/arithmetic/__init__.py',
2101755SN/A        'simd128/floating_point/arithmetic/subtraction.py',
2112292SN/A        'simd128/floating_point/arithmetic/addition.py',
2122292SN/A        'simd128/floating_point/arithmetic/horizontal_subtraction.py',
2132292SN/A        'simd128/floating_point/arithmetic/horizontal_addition.py',
2142292SN/A        'simd128/floating_point/arithmetic/square_root.py',
2152292SN/A        'simd128/floating_point/arithmetic/simultaneous_addition_and_subtraction.py',
2162292SN/A        'simd128/floating_point/arithmetic/multiplication.py',
2172292SN/A        'simd128/floating_point/arithmetic/division.py',
2182292SN/A        'simd128/floating_point/arithmetic/reciprocal_square_root.py',
2192292SN/A        'simd128/floating_point/arithmetic/reciprocal_estimation.py',
2202292SN/A        'simd128/floating_point/compare/__init__.py',
2212292SN/A        'simd128/floating_point/compare/compare_and_write_mask.py',
2222292SN/A        'simd128/floating_point/compare/compare_and_write_rflags.py',
2232292SN/A        'simd128/floating_point/compare/compare_and_write_minimum_or_maximum.py',
2242292SN/A        'simd128/floating_point/logical/__init__.py',
2252292SN/A        'simd128/floating_point/logical/andp.py',
2262292SN/A        'simd128/floating_point/logical/orp.py',
2271061SN/A        'simd128/floating_point/logical/exclusive_or.py',
2281061SN/A        'simd64/__init__.py',
2292292SN/A        'simd64/integer/__init__.py',
2302292SN/A        'simd64/integer/data_transfer/__init__.py',
2312292SN/A        'simd64/integer/data_transfer/move_mask.py',
2322292SN/A        'simd64/integer/data_transfer/move.py',
2336221Snate@binkert.org        'simd64/integer/data_transfer/move_non_temporal.py',
2341060SN/A        'simd64/integer/exit_media_state.py',
2352292SN/A        'simd64/integer/data_reordering/__init__.py',
2366221Snate@binkert.org        'simd64/integer/data_reordering/unpack_and_interleave.py',
2371060SN/A        'simd64/integer/data_reordering/pack_with_saturation.py',
2382292SN/A        'simd64/integer/data_reordering/extract_and_insert.py',
2392292SN/A        'simd64/integer/data_reordering/shuffle_and_swap.py',
2401060SN/A        'simd64/integer/data_conversion.py',
2411060SN/A        'simd64/integer/arithmetic/__init__.py',
2422292SN/A        'simd64/integer/arithmetic/subtraction.py',
2436221Snate@binkert.org        'simd64/integer/arithmetic/addition.py',
2442292SN/A        'simd64/integer/arithmetic/multiplication.py',
2452292SN/A        'simd64/integer/arithmetic/multiply_add.py',
2462292SN/A        'simd64/integer/arithmetic/average.py',
2472292SN/A        'simd64/integer/arithmetic/sum_of_absolute_differences.py',
2482292SN/A        'simd64/integer/shift/__init__.py',
2491060SN/A        'simd64/integer/shift/right_arithmetic_shift.py',
2502733Sktlim@umich.edu        'simd64/integer/shift/left_logical_shift.py',
2511060SN/A        'simd64/integer/shift/right_logical_shift.py',
2522292SN/A        'simd64/integer/compare/__init__.py',
2532292SN/A        'simd64/integer/compare/compare_and_write_mask.py',
2542292SN/A        'simd64/integer/compare/compare_and_write_minimum_or_maximum.py',
2552292SN/A        'simd64/integer/logical/__init__.py',
2562292SN/A        'simd64/integer/logical/pand.py',
2572292SN/A        'simd64/integer/logical/por.py',
2581061SN/A        'simd64/integer/logical/exclusive_or.py',
2591061SN/A        'simd64/integer/save_and_restore_state.py',
2601061SN/A        'simd64/floating_point/__init__.py',
2612292SN/A        'simd64/floating_point/arithmetic/__init__.py',
2621061SN/A        'simd64/floating_point/arithmetic/subtraction.py',
2631060SN/A        'simd64/floating_point/arithmetic/addition.py',
2641060SN/A        'simd64/floating_point/arithmetic/reciprocal_estimation.py',
2651060SN/A        'simd64/floating_point/arithmetic/multiplication.py',
2661060SN/A        'simd64/floating_point/arithmetic/accumulation.py',
2671060SN/A        'simd64/floating_point/arithmetic/reciprocal_square_root.py',
2681060SN/A        'simd64/floating_point/data_conversion.py',
2691060SN/A        'simd64/floating_point/compare/__init__.py',
2701060SN/A        'simd64/floating_point/compare/compare_and_write_mask.py',
2711060SN/A        'simd64/floating_point/compare/compare_and_write_minimum_or_maximum.py',
2721060SN/A        'x87/__init__.py',
2731060SN/A        'x87/data_transfer_and_conversion/__init__.py',
2742292SN/A        'x87/data_transfer_and_conversion/convert_and_load_or_store_integer.py',
2752292SN/A        'x87/data_transfer_and_conversion/load_or_store_floating_point.py',
2762292SN/A        'x87/data_transfer_and_conversion/exchange.py',
2772292SN/A        'x87/data_transfer_and_conversion/convert_and_load_or_store_bcd.py',
2782292SN/A        'x87/data_transfer_and_conversion/conditional_move.py',
2792292SN/A        'x87/data_transfer_and_conversion/extract.py',
2802292SN/A        'x87/load_constants/__init__.py',
2812292SN/A        'x87/load_constants/load_0_1_or_pi.py',
2822292SN/A        'x87/load_constants/load_logarithm.py',
2832292SN/A        'x87/arithmetic/__init__.py',
2842348SN/A        'x87/arithmetic/subtraction.py',
2852333SN/A        'x87/arithmetic/addition.py',
2862333SN/A        'x87/arithmetic/partial_remainder.py',
2872292SN/A        'x87/arithmetic/multiplication.py',
2882348SN/A        'x87/arithmetic/division.py',
2892348SN/A        'x87/arithmetic/change_sign.py',
2902348SN/A        'x87/arithmetic/round.py',
2912348SN/A        'x87/arithmetic/square_root.py',
2922348SN/A        'x87/transcendental_functions/__init__.py',
2932292SN/A        'x87/transcendental_functions/trigonometric_functions.py',
2942292SN/A        'x87/transcendental_functions/logarithmic_functions.py',
2952292SN/A        'x87/compare_and_test/__init__.py',
2962292SN/A        'x87/compare_and_test/classify.py',
2972292SN/A        'x87/compare_and_test/test.py',
2982292SN/A        'x87/compare_and_test/floating_point_ordered_compare.py',
2991060SN/A        'x87/compare_and_test/floating_point_unordered_compare.py',
3001060SN/A        'x87/compare_and_test/integer_compare.py',
3012292SN/A        'x87/stack_management/__init__.py',
3022292SN/A        'x87/stack_management/stack_control.py',
3031755SN/A        'x87/stack_management/clear_state.py',
3042292SN/A        'x87/control/__init__.py',
3052292SN/A        'x87/control/clear_exceptions.py',
3061061SN/A        'x87/control/initialize.py',
3072292SN/A        'x87/control/wait_for_exceptions.py',
3081061SN/A        'x87/control/save_x87_status_word.py',
3091061SN/A        'x87/control/save_and_restore_x87_control_word.py',
3101061SN/A        'x87/control/save_and_restore_x87_environment.py',
3111061SN/A        'x87/no_operation.py'
3121061SN/A        )
3131681SN/A
3141061SN/A
3151061SN/A    # Add in files generated by the ISA description.
3161061SN/A    isa_desc_files = env.ISADesc('isa/main.isa')
3171061SN/A    for f in isa_desc_files:
3182292SN/A        # Add in python file dependencies that won't be caught otherwise
3192292SN/A        for pyfile in python_files:
3202292SN/A            env.Depends(f, "isa/insts/%s" % pyfile)
3212292SN/A        # Only non-header files need to be compiled.
3222292SN/A        if not f.path.endswith('.hh'):
3232292SN/A            Source(f)
3242292SN/A