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
This commit is contained in:
@@ -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('''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user