From 546dff6b6a14cb69770769732873f72e68311ab1 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 16 Oct 2006 15:52:14 -0400 Subject: 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 --- src/arch/sparc/utility.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/arch/sparc/utility.hh') 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(xc->readMiscReg(MISCREG_ASI)) << (sizeof(MachInst) * 8)); + else + emi |= (static_cast(bits(inst, 12, 5)) + << (sizeof(MachInst) * 8)); return emi; } -- cgit v1.2.3