From 247586274724ea9f2a22a87747c9e074870d16a8 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Thu, 16 Oct 2014 05:49:44 -0400 Subject: 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 --- src/SConscript | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/SConscript') 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(''' -- cgit v1.2.3