summaryrefslogtreecommitdiff
path: root/src/arch/sparc/utility.hh
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/utility.hh
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/utility.hh')
-rw-r--r--src/arch/sparc/utility.hh4
1 files changed, 4 insertions, 0 deletions
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;
}