summaryrefslogtreecommitdiff
path: root/src/SConscript
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-10-16 05:49:44 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2014-10-16 05:49:44 -0400
commit247586274724ea9f2a22a87747c9e074870d16a8 (patch)
tree0de83b50fe2856e3bc43eb9a24e2f767719ee2d5 /src/SConscript
parentdf973abef3a70074971375cfe52c46f53528c00e (diff)
downloadgem5-247586274724ea9f2a22a87747c9e074870d16a8.tar.xz
arch,x86,mem: Dynamically determine the ISA for Ruby store check
This patch makes the memory system ISA-agnostic by enabling the Ruby Sequencer to dynamically determine if it has to do a store check. To enable this check, the ISA is encoded as an enum, and the system is able to provide the ISA to the Sequencer at run time. --HG-- rename : src/arch/x86/insts/microldstop.hh => src/arch/x86/ldstflags.hh
Diffstat (limited to 'src/SConscript')
-rwxr-xr-xsrc/SConscript12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/SConscript b/src/SConscript
index 8fe22d9ec..85bebc3ca 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -379,8 +379,20 @@ def makeTheISA(source, target, env):
''')
+ # create defines for the preprocessing and compile-time determination
for i,isa in enumerate(isas):
code('#define $0 $1', define(isa), i + 1)
+ code()
+
+ # create an enum for any run-time determination of the ISA, we
+ # reuse the same name as the namespaces
+ code('enum class Arch {')
+ for i,isa in enumerate(isas):
+ if i + 1 == len(isas):
+ code(' $0 = $1', namespace(isa), define(isa))
+ else:
+ code(' $0 = $1,', namespace(isa), define(isa))
+ code('};')
code('''