Memory64::startDisassembly(std::ostream &os) const
{
printMnemonic(os, "", false);
- printIntReg(os, dest);
+ if (isDataPrefetch()||isInstPrefetch()){
+ printPFflags(os, dest);
+ }else{
+ printIntReg(os, dest);
+ }
ccprintf(os, ", [");
printIntReg(os, base);
}
}
}
+void ArmStaticInst::printPFflags(std::ostream &os, int flag) const
+{
+ const char *flagtoprfop[]= { "PLD", "PLI", "PST", "Reserved"};
+ const char *flagtotarget[] = { "L1", "L2", "L3", "Reserved"};
+ const char *flagtopolicy[] = { "KEEP", "STRM"};
+
+ ccprintf(os, "%s%s%s", flagtoprfop[(flag>>3)&3],
+ flagtotarget[(flag>>1)&3], flagtopolicy[flag&1]);
+}
+
void
ArmStaticInst::printFloatReg(std::ostream &os, RegIndex reg_idx) const
{
elif self.flavor == "iprefetch":
self.memFlags.append("Request::PREFETCH")
self.instFlags = ['IsInstPrefetch']
+ elif self.flavor == "mprefetch":
+ self.memFlags.append("((((dest>>3)&3)==2)? \
+ (Request::PF_EXCLUSIVE):(Request::PREFETCH))")
+ self.instFlags = ['IsDataPrefetch']
if self.micro:
self.instFlags.append("IsMicroop")
self.buildEACode()
# Code that actually handles the access
- if self.flavor in ("dprefetch", "iprefetch"):
+ if self.flavor in ("dprefetch", "iprefetch", "mprefetch"):
accCode = 'uint64_t temp M5_VAR_USED = Mem%s;'
elif self.flavor == "fp":
if self.size in (1, 2, 4):
buildLoads64("ldr", "LDRSFP64", 4, False, flavor="fp")
buildLoads64("ldr", "LDRDFP64", 8, False, flavor="fp")
- LoadImm64("prfm", "PRFM64_IMM", 8, flavor="dprefetch").emit()
- LoadReg64("prfm", "PRFM64_REG", 8, flavor="dprefetch").emit()
- LoadLit64("prfm", "PRFM64_LIT", 8, literal=True, flavor="dprefetch").emit()
- LoadImm64("prfum", "PRFUM64_IMM", 8, flavor="dprefetch").emit()
+ LoadImm64("prfm", "PRFM64_IMM", 8, flavor="mprefetch").emit()
+ LoadReg64("prfm", "PRFM64_REG", 8, flavor="mprefetch").emit()
+ LoadLit64("prfm", "PRFM64_LIT", 8, literal=True,
+ flavor="mprefetch").emit()
+ LoadImm64("prfum", "PRFUM64_IMM", 8, flavor="mprefetch").emit()
LoadImm64("ldurb", "LDURB64_IMM", 1, False).emit()
LoadImm64("ldursb", "LDURSBW64_IMM", 1, True).emit()
// should writebacks be included here? prior code was inconsistent...
#define SUM_NON_DEMAND(s) \
- (s[MemCmd::SoftPFReq] + s[MemCmd::HardPFReq])
+ (s[MemCmd::SoftPFReq] + s[MemCmd::HardPFReq] + s[MemCmd::SoftPFExReq])
demandHits
.name(name() + ".demand_hits")
/* SoftPFReq */
{ SET4(IsRead, IsRequest, IsSWPrefetch, NeedsResponse),
SoftPFResp, "SoftPFReq" },
+ /* SoftPFExReq */
+ { SET6(IsRead, NeedsWritable, IsInvalidate, IsRequest,
+ IsSWPrefetch, NeedsResponse), SoftPFResp, "SoftPFExReq" },
/* HardPFReq */
{ SET5(IsRead, IsRequest, IsHWPrefetch, NeedsResponse, FromCache),
HardPFResp, "HardPFReq" },
WriteClean, // writes dirty data below without evicting
CleanEvict,
SoftPFReq,
+ SoftPFExReq,
HardPFReq,
SoftPFResp,
HardPFResp,
{
if (req->isLLSC())
return MemCmd::LoadLockedReq;
+ else if (req->isPrefetchEx())
+ return MemCmd::SoftPFExReq;
else if (req->isPrefetch())
return MemCmd::SoftPFReq;
else
bool isUncacheable() const { return _flags.isSet(UNCACHEABLE); }
bool isStrictlyOrdered() const { return _flags.isSet(STRICT_ORDER); }
bool isInstFetch() const { return _flags.isSet(INST_FETCH); }
- bool isPrefetch() const { return _flags.isSet(PREFETCH); }
+ bool isPrefetch() const { return (_flags.isSet(PREFETCH) ||
+ _flags.isSet(PF_EXCLUSIVE)); }
+ bool isPrefetchEx() const { return _flags.isSet(PF_EXCLUSIVE); }
bool isLLSC() const { return _flags.isSet(LLSC); }
bool isPriv() const { return _flags.isSet(PRIVILEGED); }
bool isLockedRMW() const { return _flags.isSet(LOCKED_RMW); }