execBase = 'Store'
def __init__(self, mnem, post, add, writeback, size=4,
- sign=False, user=False, flavor="normal"):
+ sign=False, user=False, flavor="normal",
+ instFlags = []):
super(StoreInst, self).__init__()
self.name = mnem
self.sign = sign
self.user = user
self.flavor = flavor
-
+ self.instFlags = instFlags
if self.add:
self.op = " +"
else:
(newHeader,
newDecoder,
newExec) = self.fillTemplates(self.name, self.Name, codeBlobs,
- self.memFlags, [], base, wbDecl)
+ self.memFlags, self.instFlags, base, wbDecl)
header_output += newHeader
decoder_output += newDecoder
decConstBase = 'StoreExImm'
basePrefix = 'MemoryExImm'
nameFunc = staticmethod(storeImmClassName)
+ instFlags = ['IsStoreConditional']
def __init__(self, *args, **kargs):
super(StoreImmEx, self).__init__(*args, **kargs)
decConstBase = 'StoreExDImm'
basePrefix = 'MemoryExDImm'
nameFunc = staticmethod(storeDoubleImmClassName)
+ instFlags = ['IsStoreConditional']
def __init__(self, *args, **kargs):
super(StoreDoubleImmEx, self).__init__(*args, **kargs)
decConstBase = 'Swap'
def __init__(self, name, Name, eaCode,
- preAccCode, postAccCode, memFlags):
+ preAccCode, postAccCode, memFlags, instFlags = []):
super(SwapInst, self).__init__()
self.name = name
self.Name = Name
self.preAccCode = preAccCode
self.postAccCode = postAccCode
self.memFlags = memFlags
+ self.instFlags = instFlags
def emit(self):
global header_output, decoder_output, exec_output
"preacc_code": self.preAccCode,
"postacc_code": self.postAccCode }
codeBlobs["predicate_test"] = pickPredicate(codeBlobs)
-
(newHeader,
newDecoder,
newExec) = self.fillTemplates(self.name, self.Name, codeBlobs,
- self.memFlags,
- ['IsStoreConditional'],
+ self.memFlags, self.instFlags,
base = 'Swap')
header_output += newHeader
decoder_output += newDecoder
'Dest = cSwap((uint32_t)memData, ((CPSR)Cpsr).e);',
['Request::MEM_SWAP',
'ArmISA::TLB::AlignWord',
- 'ArmISA::TLB::MustBeOne']).emit()
+ 'ArmISA::TLB::MustBeOne'],
+ ['IsStoreConditional']).emit()
SwapInst('swpb', 'Swpb', 'EA = Base;',
'Mem.ub = cSwap(Op1.ub, ((CPSR)Cpsr).e);',
'Dest.ub = cSwap((uint8_t)memData, ((CPSR)Cpsr).e);',
['Request::MEM_SWAP',
'ArmISA::TLB::AlignByte',
- 'ArmISA::TLB::MustBeOne']).emit()
+ 'ArmISA::TLB::MustBeOne'],
+ ['IsStoreConditional']).emit()
}};