SConscript revision 10196:be0e1724eb39
12SN/A# -*- mode:python -*-
214205Sandreas.sandberg@arm.com
314205Sandreas.sandberg@arm.com# Copyright (c) 2007-2008 The Hewlett-Packard Development Company
414205Sandreas.sandberg@arm.com# All rights reserved.
514205Sandreas.sandberg@arm.com#
614205Sandreas.sandberg@arm.com# The license below extends only to copyright in the software and shall
714205Sandreas.sandberg@arm.com# not be construed as granting a license to any other intellectual
814205Sandreas.sandberg@arm.com# property including but not limited to intellectual property relating
914205Sandreas.sandberg@arm.com# to a hardware implementation of the functionality of the software
1014205Sandreas.sandberg@arm.com# licensed hereunder.  You may use the software subject to the license
1114205Sandreas.sandberg@arm.com# terms below provided that you ensure that this notice is replicated
1214205Sandreas.sandberg@arm.com# unmodified and in its entirety in all distributions of the software,
1314205Sandreas.sandberg@arm.com# modified or unmodified, in source code or in binary form.
141762SN/A#
1511904Spierre-yves.peneau@lirmm.fr# Copyright (c) 2005-2006 The Regents of The University of Michigan
162SN/A# All rights reserved.
172SN/A#
182SN/A# Redistribution and use in source and binary forms, with or without
192SN/A# modification, are permitted provided that the following conditions are
202SN/A# met: redistributions of source code must retain the above copyright
212SN/A# notice, this list of conditions and the following disclaimer;
222SN/A# redistributions in binary form must reproduce the above copyright
232SN/A# notice, this list of conditions and the following disclaimer in the
242SN/A# documentation and/or other materials provided with the distribution;
252SN/A# neither the name of the copyright holders nor the names of its
262SN/A# contributors may be used to endorse or promote products derived from
272SN/A# this software without specific prior written permission.
282SN/A#
292SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
302SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
312SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
322SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
332SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
342SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
352SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
362SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
372SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
382SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
392SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
402665Ssaidi@eecs.umich.edu#
412665Ssaidi@eecs.umich.edu# Authors: Gabe Black
4211904Spierre-yves.peneau@lirmm.fr
432SN/AImport('*')
442SN/A
4567SN/Aif env['TARGET_ISA'] == 'x86':
4667SN/A    Source('cpuid.cc')
4767SN/A    Source('decoder.cc')
4860SN/A    Source('decoder_tables.cc')
4960SN/A    Source('emulenv.cc')
5060SN/A    Source('faults.cc')
5160SN/A    Source('insts/badmicroop.cc')
5260SN/A    Source('insts/microfpop.cc')
5360SN/A    Source('insts/microldstop.cc')
5460SN/A    Source('insts/micromediaop.cc')
5560SN/A    Source('insts/microop.cc')
5660SN/A    Source('insts/microregop.cc')
5760SN/A    Source('insts/static_inst.cc')
5860SN/A    Source('interrupts.cc')
5967SN/A    Source('isa.cc')
6060SN/A    Source('linux/linux.cc')
61695SN/A    Source('linux/process.cc')
62695SN/A    Source('linux/syscalls.cc')
632SN/A    Source('linux/system.cc')
642SN/A    Source('nativetrace.cc')
65436SN/A    Source('pagetable.cc')
663918Ssaidi@eecs.umich.edu    Source('pagetable_walker.cc')
678230Snate@binkert.org    Source('process.cc')
683918Ssaidi@eecs.umich.edu    Source('remote_gdb.cc')
69436SN/A    Source('stacktrace.cc')
702SN/A    Source('system.cc')
712SN/A    Source('tlb.cc')
725887Snate@binkert.org    Source('types.cc')
738514SThomas.Grass@ARM.com    Source('utility.cc')
7410471Sandreas.hansson@arm.com    Source('vtophys.cc')
752SN/A
762SN/A    SimObject('X86ISA.py')
772SN/A    SimObject('X86LocalApic.py')
7814205Sandreas.sandberg@arm.com    SimObject('X86NativeTrace.py')
798229Snate@binkert.org    SimObject('X86System.py')
808296Snate@binkert.org    SimObject('X86TLB.py')
818229Snate@binkert.org
825886Snate@binkert.org    DebugFlag('Faults', "Trace all faults/exceptions/traps")
83436SN/A    DebugFlag('LocalApic', "Local APIC debugging")
84436SN/A    DebugFlag('PageTableWalker', \
856216Snate@binkert.org              "Page table walker state machine debugging")
866214Snate@binkert.org    DebugFlag('Decoder', "Decoder debug output")
872SN/A    DebugFlag('X86', "Generic X86 ISA debugging")
88159SN/A
89159SN/A    python_files = (
904092Sbinkertn@umich.edu        '__init__.py',
917823Ssteve.reinhardt@amd.com        'general_purpose/__init__.py',
922SN/A        'general_purpose/arithmetic/__init__.py',
9367SN/A        'general_purpose/arithmetic/add_and_subtract.py',
94729SN/A        'general_purpose/arithmetic/increment_and_decrement.py',
95388SN/A        'general_purpose/arithmetic/multiply_and_divide.py',
965996Snate@binkert.org        'general_purpose/cache_and_memory_management.py',
976128Snate@binkert.org        'general_purpose/compare_and_test/__init__.py',
985996Snate@binkert.org        'general_purpose/compare_and_test/bit_scan.py',
995996Snate@binkert.org        'general_purpose/compare_and_test/bit_test.py',
1005996Snate@binkert.org        'general_purpose/compare_and_test/bounds.py',
1015996Snate@binkert.org        'general_purpose/compare_and_test/compare.py',
1025996Snate@binkert.org        'general_purpose/compare_and_test/set_byte_on_condition.py',
1036128Snate@binkert.org        'general_purpose/compare_and_test/test.py',
1045996Snate@binkert.org        'general_purpose/control_transfer/__init__.py',
1055996Snate@binkert.org        'general_purpose/control_transfer/call.py',
1066001Snate@binkert.org        'general_purpose/control_transfer/conditional_jump.py',
1075996Snate@binkert.org        'general_purpose/control_transfer/interrupts_and_exceptions.py',
1086001Snate@binkert.org        'general_purpose/control_transfer/jump.py',
1098296Snate@binkert.org        'general_purpose/control_transfer/loop.py',
1106001Snate@binkert.org        'general_purpose/control_transfer/xreturn.py',
1116001Snate@binkert.org        'general_purpose/data_conversion/__init__.py',
1126001Snate@binkert.org        'general_purpose/data_conversion/ascii_adjust.py',
1135996Snate@binkert.org        'general_purpose/data_conversion/bcd_adjust.py',
1145996Snate@binkert.org        'general_purpose/data_conversion/endian_conversion.py',
1155996Snate@binkert.org        'general_purpose/data_conversion/extract_sign_mask.py',
116695SN/A        'general_purpose/data_conversion/sign_extension.py',
1176128Snate@binkert.org        'general_purpose/data_conversion/translate.py',
118388SN/A        'general_purpose/data_transfer/__init__.py',
119388SN/A        'general_purpose/data_transfer/conditional_move.py',
1206128Snate@binkert.org        'general_purpose/data_transfer/move.py',
1215996Snate@binkert.org        'general_purpose/data_transfer/stack_operations.py',
1225996Snate@binkert.org        'general_purpose/data_transfer/xchg.py',
1235996Snate@binkert.org        'general_purpose/flags/__init__.py',
1245996Snate@binkert.org        'general_purpose/flags/load_and_store.py',
125388SN/A        'general_purpose/flags/push_and_pop.py',
126388SN/A        'general_purpose/flags/set_and_clear.py',
127695SN/A        'general_purpose/input_output/__init__.py',
1286128Snate@binkert.org        'general_purpose/input_output/general_io.py',
129388SN/A        'general_purpose/input_output/string_io.py',
130388SN/A        'general_purpose/load_effective_address.py',
131695SN/A        'general_purpose/load_segment_registers.py',
132695SN/A        'general_purpose/logical.py',
133388SN/A        'general_purpose/no_operation.py',
134388SN/A        'general_purpose/rotate_and_shift/__init__.py',
1356128Snate@binkert.org        'general_purpose/rotate_and_shift/rotate.py',
1365996Snate@binkert.org        'general_purpose/rotate_and_shift/shift.py',
1375996Snate@binkert.org        'general_purpose/semaphores.py',
1385994Snate@binkert.org        'general_purpose/string/__init__.py',
1395994Snate@binkert.org        'general_purpose/string/compare_strings.py',
1405598Snate@binkert.org        'general_purpose/string/load_string.py',
141388SN/A        'general_purpose/string/move_string.py',
1425996Snate@binkert.org        'general_purpose/string/scan_string.py',
143695SN/A        'general_purpose/string/store_string.py',
144388SN/A        'general_purpose/system_calls.py',
1455598Snate@binkert.org        'romutil.py',
1465994Snate@binkert.org        'system/__init__.py',
1475598Snate@binkert.org        'system/control_registers.py',
148388SN/A        'system/halt.py',
1495996Snate@binkert.org        'system/invlpg.py',
150695SN/A        'system/undefined_operation.py',
151695SN/A        'system/msrs.py',
1525598Snate@binkert.org        'system/segmentation.py',
1535996Snate@binkert.org        'simd128/__init__.py',
154388SN/A        'simd128/integer/__init__.py',
155388SN/A        'simd128/integer/data_transfer/__init__.py',
156695SN/A        'simd128/integer/data_transfer/move.py',
1576128Snate@binkert.org        'simd128/integer/data_transfer/move_non_temporal.py',
158388SN/A        'simd128/integer/data_transfer/move_mask.py',
159388SN/A        'simd128/integer/data_conversion/__init__.py',
1606128Snate@binkert.org        'simd128/integer/data_conversion/convert_mmx_integer_to_floating_point.py',
161388SN/A        'simd128/integer/data_conversion/convert_integer_to_floating_point.py',
162388SN/A        'simd128/integer/data_conversion/convert_gpr_integer_to_floating_point.py',
163695SN/A        'simd128/integer/data_reordering/__init__.py',
1646128Snate@binkert.org        'simd128/integer/data_reordering/unpack_and_interleave.py',
165388SN/A        'simd128/integer/data_reordering/pack_with_saturation.py',
166388SN/A        'simd128/integer/data_reordering/extract_and_insert.py',
1676128Snate@binkert.org        'simd128/integer/data_reordering/shuffle.py',
1685996Snate@binkert.org        'simd128/integer/arithmetic/__init__.py',
1695996Snate@binkert.org        'simd128/integer/arithmetic/subtraction.py',
170388SN/A        'simd128/integer/arithmetic/addition.py',
171388SN/A        'simd128/integer/arithmetic/multiplication.py',
172695SN/A        'simd128/integer/arithmetic/multiply_add.py',
1736128Snate@binkert.org        'simd128/integer/arithmetic/average.py',
174388SN/A        'simd128/integer/arithmetic/sum_of_absolute_differences.py',
175388SN/A        'simd128/integer/shift/__init__.py',
1766128Snate@binkert.org        'simd128/integer/shift/right_arithmetic_shift.py',
17711565Sdavid.guillen@arm.com        'simd128/integer/shift/left_logical_shift.py',
17811565Sdavid.guillen@arm.com        'simd128/integer/shift/right_logical_shift.py',
179388SN/A        'simd128/integer/compare/__init__.py',
180388SN/A        'simd128/integer/compare/compare_and_write_mask.py',
1817505Snate@binkert.org        'simd128/integer/compare/compare_and_write_minimum_or_maximum.py',
1827505Snate@binkert.org        'simd128/integer/logical/__init__.py',
1837505Snate@binkert.org        'simd128/integer/logical/pand.py',
1847505Snate@binkert.org        'simd128/integer/logical/por.py',
1857505Snate@binkert.org        'simd128/integer/logical/exclusive_or.py',
1865886Snate@binkert.org        'simd128/integer/save_and_restore_state/__init__.py',
187388SN/A        'simd128/integer/save_and_restore_state/save_and_restore_state.py',
18814205Sandreas.sandberg@arm.com        'simd128/integer/save_and_restore_state/save_and_restore_control_and_status.py',
18914205Sandreas.sandberg@arm.com        'simd128/floating_point/__init__.py',
19014205Sandreas.sandberg@arm.com        'simd128/floating_point/data_transfer/__init__.py',
191388SN/A        'simd128/floating_point/data_transfer/move_mask.py',
1925886Snate@binkert.org        'simd128/floating_point/data_transfer/move.py',
19314205Sandreas.sandberg@arm.com        'simd128/floating_point/data_transfer/move_with_duplication.py',
1945886Snate@binkert.org        'simd128/floating_point/data_transfer/move_non_temporal.py',
1955889Snate@binkert.org        'simd128/floating_point/data_conversion/__init__.py',
1965889Snate@binkert.org        'simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py',
197388SN/A        'simd128/floating_point/data_conversion/convert_floating_point_to_xmm_integer.py',
1985886Snate@binkert.org        'simd128/floating_point/data_conversion/convert_floating_point_to_mmx_integer.py',
1995889Snate@binkert.org        'simd128/floating_point/data_conversion/convert_floating_point_to_gpr_integer.py',
2005886Snate@binkert.org        'simd128/floating_point/data_reordering/__init__.py',
2015889Snate@binkert.org        'simd128/floating_point/data_reordering/unpack_and_interleave.py',
2025886Snate@binkert.org        'simd128/floating_point/data_reordering/shuffle.py',
2035996Snate@binkert.org        'simd128/floating_point/arithmetic/__init__.py',
2045996Snate@binkert.org        'simd128/floating_point/arithmetic/subtraction.py',
20514205Sandreas.sandberg@arm.com        'simd128/floating_point/arithmetic/addition.py',
20614205Sandreas.sandberg@arm.com        'simd128/floating_point/arithmetic/horizontal_subtraction.py',
20714205Sandreas.sandberg@arm.com        'simd128/floating_point/arithmetic/horizontal_addition.py',
2085996Snate@binkert.org        'simd128/floating_point/arithmetic/square_root.py',
2095996Snate@binkert.org        'simd128/floating_point/arithmetic/simultaneous_addition_and_subtraction.py',
2105996Snate@binkert.org        'simd128/floating_point/arithmetic/multiplication.py',
2116001Snate@binkert.org        'simd128/floating_point/arithmetic/division.py',
2125996Snate@binkert.org        'simd128/floating_point/arithmetic/reciprocal_square_root.py',
2135996Snate@binkert.org        'simd128/floating_point/arithmetic/reciprocal_estimation.py',
2145996Snate@binkert.org        'simd128/floating_point/compare/__init__.py',
2155996Snate@binkert.org        'simd128/floating_point/compare/compare_and_write_mask.py',
2165996Snate@binkert.org        'simd128/floating_point/compare/compare_and_write_rflags.py',
2175996Snate@binkert.org        'simd128/floating_point/compare/compare_and_write_minimum_or_maximum.py',
2185996Snate@binkert.org        'simd128/floating_point/logical/__init__.py',
2195996Snate@binkert.org        'simd128/floating_point/logical/andp.py',
2205996Snate@binkert.org        'simd128/floating_point/logical/orp.py',
2215996Snate@binkert.org        'simd128/floating_point/logical/exclusive_or.py',
2225996Snate@binkert.org        'simd64/__init__.py',
2235996Snate@binkert.org        'simd64/integer/__init__.py',
2245996Snate@binkert.org        'simd64/integer/data_transfer/__init__.py',
225388SN/A        'simd64/integer/data_transfer/move_mask.py',
226388SN/A        'simd64/integer/data_transfer/move.py',
2276128Snate@binkert.org        'simd64/integer/data_transfer/move_non_temporal.py',
2286000Snate@binkert.org        'simd64/integer/exit_media_state.py',
229388SN/A        'simd64/integer/data_reordering/__init__.py',
2305886Snate@binkert.org        'simd64/integer/data_reordering/unpack_and_interleave.py',
2316128Snate@binkert.org        'simd64/integer/data_reordering/pack_with_saturation.py',
2325886Snate@binkert.org        'simd64/integer/data_reordering/extract_and_insert.py',
233388SN/A        'simd64/integer/data_reordering/shuffle_and_swap.py',
2346000Snate@binkert.org        'simd64/integer/data_conversion.py',
235388SN/A        'simd64/integer/arithmetic/__init__.py',
236388SN/A        'simd64/integer/arithmetic/subtraction.py',
2376000Snate@binkert.org        'simd64/integer/arithmetic/addition.py',
2385886Snate@binkert.org        'simd64/integer/arithmetic/multiplication.py',
239388SN/A        'simd64/integer/arithmetic/multiply_add.py',
2406000Snate@binkert.org        'simd64/integer/arithmetic/average.py',
241388SN/A        'simd64/integer/arithmetic/sum_of_absolute_differences.py',
242388SN/A        'simd64/integer/shift/__init__.py',
243388SN/A        'simd64/integer/shift/right_arithmetic_shift.py',
2446000Snate@binkert.org        'simd64/integer/shift/left_logical_shift.py',
2455886Snate@binkert.org        'simd64/integer/shift/right_logical_shift.py',
246388SN/A        'simd64/integer/compare/__init__.py',
2476000Snate@binkert.org        'simd64/integer/compare/compare_and_write_mask.py',
248388SN/A        'simd64/integer/compare/compare_and_write_minimum_or_maximum.py',
249388SN/A        'simd64/integer/logical/__init__.py',
250388SN/A        'simd64/integer/logical/pand.py',
25114205Sandreas.sandberg@arm.com        'simd64/integer/logical/por.py',
25214205Sandreas.sandberg@arm.com        'simd64/integer/logical/exclusive_or.py',
25314205Sandreas.sandberg@arm.com        'simd64/integer/save_and_restore_state.py',
25414205Sandreas.sandberg@arm.com        'simd64/floating_point/__init__.py',
25514205Sandreas.sandberg@arm.com        'simd64/floating_point/arithmetic/__init__.py',
25614205Sandreas.sandberg@arm.com        'simd64/floating_point/arithmetic/subtraction.py',
257388SN/A        'simd64/floating_point/arithmetic/addition.py',
25814205Sandreas.sandberg@arm.com        'simd64/floating_point/arithmetic/reciprocal_estimation.py',
25914205Sandreas.sandberg@arm.com        'simd64/floating_point/arithmetic/multiplication.py',
26014205Sandreas.sandberg@arm.com        'simd64/floating_point/arithmetic/accumulation.py',
26114205Sandreas.sandberg@arm.com        'simd64/floating_point/arithmetic/reciprocal_square_root.py',
26214205Sandreas.sandberg@arm.com        'simd64/floating_point/data_conversion.py',
26314205Sandreas.sandberg@arm.com        'simd64/floating_point/compare/__init__.py',
26414205Sandreas.sandberg@arm.com        'simd64/floating_point/compare/compare_and_write_mask.py',
26514266Sandreas.sandberg@arm.com        'simd64/floating_point/compare/compare_and_write_minimum_or_maximum.py',
26614205Sandreas.sandberg@arm.com        'x87/__init__.py',
26714205Sandreas.sandberg@arm.com        'x87/data_transfer_and_conversion/__init__.py',
26814205Sandreas.sandberg@arm.com        'x87/data_transfer_and_conversion/convert_and_load_or_store_integer.py',
26914205Sandreas.sandberg@arm.com        'x87/data_transfer_and_conversion/load_or_store_floating_point.py',
27014205Sandreas.sandberg@arm.com        'x87/data_transfer_and_conversion/exchange.py',
271388SN/A        'x87/data_transfer_and_conversion/convert_and_load_or_store_bcd.py',
272388SN/A        'x87/data_transfer_and_conversion/conditional_move.py',
273388SN/A        'x87/data_transfer_and_conversion/extract.py',
274388SN/A        'x87/load_constants/__init__.py',
275388SN/A        'x87/load_constants/load_0_1_or_pi.py',
276388SN/A        'x87/load_constants/load_logarithm.py',
277388SN/A        'x87/arithmetic/__init__.py',
2785995Snate@binkert.org        'x87/arithmetic/subtraction.py',
2796026Snate@binkert.org        'x87/arithmetic/addition.py',
280388SN/A        'x87/arithmetic/partial_remainder.py',
2816000Snate@binkert.org        'x87/arithmetic/multiplication.py',
2826026Snate@binkert.org        'x87/arithmetic/division.py',
2837462Snate@binkert.org        'x87/arithmetic/change_sign.py',
2841354SN/A        'x87/arithmetic/round.py',
285388SN/A        'x87/arithmetic/square_root.py',
2866000Snate@binkert.org        'x87/transcendental_functions/__init__.py',
287388SN/A        'x87/transcendental_functions/trigonometric_functions.py',
288388SN/A        'x87/transcendental_functions/logarithmic_functions.py',
2898243Sbradley.danofsky@amd.com        'x87/compare_and_test/__init__.py',
2908243Sbradley.danofsky@amd.com        'x87/compare_and_test/classify.py',
2918243Sbradley.danofsky@amd.com        'x87/compare_and_test/test.py',
2928243Sbradley.danofsky@amd.com        'x87/compare_and_test/floating_point_ordered_compare.py',
2938243Sbradley.danofsky@amd.com        'x87/compare_and_test/floating_point_unordered_compare.py',
2948243Sbradley.danofsky@amd.com        'x87/compare_and_test/integer_compare.py',
2958243Sbradley.danofsky@amd.com        'x87/stack_management/__init__.py',
2968243Sbradley.danofsky@amd.com        'x87/stack_management/stack_control.py',
2978243Sbradley.danofsky@amd.com        'x87/stack_management/clear_state.py',
2988243Sbradley.danofsky@amd.com        'x87/control/__init__.py',
2998243Sbradley.danofsky@amd.com        'x87/control/clear_exceptions.py',
3008243Sbradley.danofsky@amd.com        'x87/control/initialize.py',
3018243Sbradley.danofsky@amd.com        'x87/control/wait_for_exceptions.py',
3028243Sbradley.danofsky@amd.com        'x87/control/save_x87_status_word.py',
3038243Sbradley.danofsky@amd.com        'x87/control/save_and_restore_x87_control_word.py',
3048243Sbradley.danofsky@amd.com        'x87/control/save_and_restore_x87_environment.py',
3058243Sbradley.danofsky@amd.com        'x87/no_operation.py'
306388SN/A        )
307388SN/A
308388SN/A
309388SN/A    # Add in files generated by the ISA description.
310388SN/A    isa_desc_files = env.ISADesc('isa/main.isa')
3115995Snate@binkert.org    for f in isa_desc_files:
3125598Snate@binkert.org        # Add in python file dependencies that won't be caught otherwise
313388SN/A        for pyfile in python_files:
3145886Snate@binkert.org            env.Depends(f, "isa/insts/%s" % pyfile)
3151354SN/A