SConstruct (10278:362875aec1ba) SConstruct (10319:4207f9bfcceb)
1# -*- mode:python -*-
2
3# Copyright (c) 2013 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 1011 unchanged lines hidden (view full) ---

1020Export('all_isa_list')
1021
1022class CpuModel(object):
1023 '''The CpuModel class encapsulates everything the ISA parser needs to
1024 know about a particular CPU model.'''
1025
1026 # Dict of available CPU model objects. Accessible as CpuModel.dict.
1027 dict = {}
1# -*- mode:python -*-
2
3# Copyright (c) 2013 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 1011 unchanged lines hidden (view full) ---

1020Export('all_isa_list')
1021
1022class CpuModel(object):
1023 '''The CpuModel class encapsulates everything the ISA parser needs to
1024 know about a particular CPU model.'''
1025
1026 # Dict of available CPU model objects. Accessible as CpuModel.dict.
1027 dict = {}
1028 list = []
1029 defaults = []
1030
1031 # Constructor. Automatically adds models to CpuModel.dict.
1028
1029 # Constructor. Automatically adds models to CpuModel.dict.
1032 def __init__(self, name, filename, includes, strings, default=False):
1030 def __init__(self, name, default=False):
1033 self.name = name # name of model
1031 self.name = name # name of model
1034 self.filename = filename # filename for output exec code
1035 self.includes = includes # include files needed in exec file
1036 # The 'strings' dict holds all the per-CPU symbols we can
1037 # substitute into templates etc.
1038 self.strings = strings
1039
1040 # This cpu is enabled by default
1041 self.default = default
1042
1043 # Add self to dict
1044 if name in CpuModel.dict:
1045 raise AttributeError, "CpuModel '%s' already registered" % name
1046 CpuModel.dict[name] = self
1032
1033 # This cpu is enabled by default
1034 self.default = default
1035
1036 # Add self to dict
1037 if name in CpuModel.dict:
1038 raise AttributeError, "CpuModel '%s' already registered" % name
1039 CpuModel.dict[name] = self
1047 CpuModel.list.append(name)
1048
1049Export('CpuModel')
1050
1051# Sticky variables get saved in the variables file so they persist from
1052# one invocation to the next (unless overridden, in which case the new
1053# value becomes sticky).
1054sticky_vars = Variables(args=ARGUMENTS)
1055Export('sticky_vars')

--- 25 unchanged lines hidden (view full) ---

1081 SConscript(joinpath(root, 'SConsopts'))
1082
1083all_isa_list.sort()
1084
1085sticky_vars.AddVariables(
1086 EnumVariable('TARGET_ISA', 'Target ISA', 'alpha', all_isa_list),
1087 ListVariable('CPU_MODELS', 'CPU models',
1088 sorted(n for n,m in CpuModel.dict.iteritems() if m.default),
1040
1041Export('CpuModel')
1042
1043# Sticky variables get saved in the variables file so they persist from
1044# one invocation to the next (unless overridden, in which case the new
1045# value becomes sticky).
1046sticky_vars = Variables(args=ARGUMENTS)
1047Export('sticky_vars')

--- 25 unchanged lines hidden (view full) ---

1073 SConscript(joinpath(root, 'SConsopts'))
1074
1075all_isa_list.sort()
1076
1077sticky_vars.AddVariables(
1078 EnumVariable('TARGET_ISA', 'Target ISA', 'alpha', all_isa_list),
1079 ListVariable('CPU_MODELS', 'CPU models',
1080 sorted(n for n,m in CpuModel.dict.iteritems() if m.default),
1089 sorted(CpuModel.list)),
1081 sorted(CpuModel.dict.keys())),
1090 BoolVariable('EFENCE', 'Link with Electric Fence malloc debugger',
1091 False),
1092 BoolVariable('SS_COMPATIBLE_FP',
1093 'Make floating-point results compatible with SimpleScalar',
1094 False),
1095 BoolVariable('USE_SSE2',
1096 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts',
1097 False),

--- 277 unchanged lines hidden ---
1082 BoolVariable('EFENCE', 'Link with Electric Fence malloc debugger',
1083 False),
1084 BoolVariable('SS_COMPATIBLE_FP',
1085 'Make floating-point results compatible with SimpleScalar',
1086 False),
1087 BoolVariable('USE_SSE2',
1088 'Compile for SSE2 (-msse2) to get IEEE FP on x86 hosts',
1089 False),

--- 277 unchanged lines hidden ---