summaryrefslogtreecommitdiff
path: root/src/arch/sparc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-10-16 15:52:14 -0400
committerGabe Black <gblack@eecs.umich.edu>2006-10-16 15:52:14 -0400
commit546dff6b6a14cb69770769732873f72e68311ab1 (patch)
tree7e8a3c40fb56139523a0ceb1da1475e4bfa53805 /src/arch/sparc
parent67794ace5c44866a85cecd39c881464ecbe74597 (diff)
downloadgem5-546dff6b6a14cb69770769732873f72e68311ab1.tar.xz
Made sure the constructor for insts use ExtMachInst rather than MachInst, since otherwise the EXT_ASI field is lost.
src/arch/sparc/isa/base.isa: src/arch/sparc/isa/formats/micro.isa: Switch MachInst to ExtMachInst so that the EXT_ASI field is available to the instructions. src/arch/sparc/utility.hh: Made sure EXT_ASI was set to the appropriate ASI value whether or not the asi register was used. --HG-- extra : convert_revision : cc4363dfe7da81969959cec9d5ad48528edeb8ce
Diffstat (limited to 'src/arch/sparc')
-rw-r--r--src/arch/sparc/isa/base.isa2
-rw-r--r--src/arch/sparc/isa/formats/micro.isa6
-rw-r--r--src/arch/sparc/utility.hh4
3 files changed, 8 insertions, 4 deletions
diff --git a/src/arch/sparc/isa/base.isa b/src/arch/sparc/isa/base.isa
index b518265aa..a4c022411 100644
--- a/src/arch/sparc/isa/base.isa
+++ b/src/arch/sparc/isa/base.isa
@@ -77,7 +77,7 @@ output header {{
protected:
// Constructor.
SparcStaticInst(const char *mnem,
- MachInst _machInst, OpClass __opClass)
+ ExtMachInst _machInst, OpClass __opClass)
: StaticInst(mnem, _machInst, __opClass)
{
}
diff --git a/src/arch/sparc/isa/formats/micro.isa b/src/arch/sparc/isa/formats/micro.isa
index 320603a6a..82d7fb4cb 100644
--- a/src/arch/sparc/isa/formats/micro.isa
+++ b/src/arch/sparc/isa/formats/micro.isa
@@ -34,7 +34,7 @@ output header {{
const uint32_t numMicroOps;
//Constructor.
- SparcMacroInst(const char *mnem, MachInst _machInst,
+ SparcMacroInst(const char *mnem, ExtMachInst _machInst,
OpClass __opClass, uint32_t _numMicroOps)
: SparcStaticInst(mnem, _machInst, __opClass),
numMicroOps(_numMicroOps)
@@ -68,7 +68,7 @@ output header {{
protected:
//Constructor.
SparcMicroInst(const char *mnem,
- MachInst _machInst, OpClass __opClass)
+ ExtMachInst _machInst, OpClass __opClass)
: SparcStaticInst(mnem, _machInst, __opClass)
{
flags[IsMicroOp] = true;
@@ -80,7 +80,7 @@ output header {{
protected:
//Constructor.
SparcDelayedMicroInst(const char *mnem,
- MachInst _machInst, OpClass __opClass)
+ ExtMachInst _machInst, OpClass __opClass)
: SparcMicroInst(mnem, _machInst, __opClass)
{
flags[IsDelayedCommit] = true;
diff --git a/src/arch/sparc/utility.hh b/src/arch/sparc/utility.hh
index 796b6ba4c..23fddf0e9 100644
--- a/src/arch/sparc/utility.hh
+++ b/src/arch/sparc/utility.hh
@@ -33,6 +33,7 @@
#include "arch/sparc/isa_traits.hh"
#include "base/misc.hh"
+#include "base/bitfield.hh"
#include "cpu/thread_context.hh"
namespace SparcISA
@@ -47,6 +48,9 @@ namespace SparcISA
if(inst & (1 << 13))
emi |= (static_cast<ExtMachInst>(xc->readMiscReg(MISCREG_ASI))
<< (sizeof(MachInst) * 8));
+ else
+ emi |= (static_cast<ExtMachInst>(bits(inst, 12, 5))
+ << (sizeof(MachInst) * 8));
return emi;
}