Pseudoinst: Add an initParam pseudo inst function.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 19 Sep 2011 06:26:39 +0000 (23:26 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 19 Sep 2011 06:26:39 +0000 (23:26 -0700)
src/arch/alpha/isa/decoder.isa
src/arch/arm/isa/insts/m5ops.isa
src/arch/x86/isa/decoder/two_byte_opcodes.isa
src/sim/pseudo_inst.cc
src/sim/pseudo_inst.hh

index f0aa5a3fd7938b1135ccddd689e9fb64601acc0f..359c6b3b2320dc08a60f537e7e4a5252042f4864 100644 (file)
@@ -985,7 +985,7 @@ decode OPCODE default Unknown::unknown() {
                 PseudoInst::loadsymbol(xc->tcBase());
             }}, No_OpClass, IsNonSpeculative);
             0x30: initparam({{
-                Ra = xc->tcBase()->getCpuPtr()->system->init_param;
+                Ra = PseudoInst::initParam(xc->tcBase());
             }});
 #endif
             0x40: resetstats({{
index 9bd1f4f01c7266151fa524c190f2c26ece04c91a..e891a0a91ac12b9f6b064c1f039132d84c201e3f 100644 (file)
@@ -203,7 +203,7 @@ let {{
 
     initparamCode = '''
 #if FULL_SYSTEM
-    Rt = xc->tcBase()->getCpuPtr()->system->init_param;
+    Rt = PseudoInst::initParam(xc->tcBase());
 #endif
     '''
 
index 11cd6eeb132b0b7764e7ab1887642d80ce4aeaf0..f856f2d371d21939f946648e25f2c169b05dfc64 100644 (file)
                         }}, IsNonSpeculative);
 #if FULL_SYSTEM
                         0x30: m5initparam({{
-                            Rax = xc->tcBase()->getCpuPtr()->
-                                      system->init_param;
+                            Rax = PseudoInst::initParam(xc->tcBase());
                         }}, IsNonSpeculative);
                         0x31: m5loadsymbol({{
                             PseudoInst::loadsymbol(xc->tcBase());
index eba7273c3cebae0f212304bc3bd303e807dcfb6a..2264958479b3ca72fc11a82fe1cead405c3a05e4 100644 (file)
@@ -260,6 +260,12 @@ addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
     debugSymbolTable->insert(addr,symbol);
 }
 
+uint64_t
+initParam(ThreadContext *tc)
+{
+    return tc->getCpuPtr()->system->init_param;
+}
+
 #endif
 
 
index 25ecbc029740414405038ec0ea556e47c28389c3..95ef0d187bb84d9b7467cde24bf79570b9cddaa6 100644 (file)
@@ -56,6 +56,7 @@ uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len,
     uint64_t offset);
 void loadsymbol(ThreadContext *xc);
 void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr);
+uint64_t initParam(ThreadContext *xc);
 #endif
 
 uint64_t rpns(ThreadContext *tc);