X86: Add a .serializing directive that makes a macroop serializing.
This directive really just tells the macroop to set IsSerializing and IsSerializeAfter on its final microop.
This commit is contained in:
parent
5a1dbe4d99
commit
69fc2af006
1 changed files with 8 additions and 1 deletions
|
@ -139,12 +139,15 @@ let {{
|
||||||
self.adjust_imm += val
|
self.adjust_imm += val
|
||||||
def adjustDisp(self, val):
|
def adjustDisp(self, val):
|
||||||
self.adjust_disp += val
|
self.adjust_disp += val
|
||||||
|
def serializing(self):
|
||||||
|
self.serializing = True
|
||||||
def __init__(self, name):
|
def __init__(self, name):
|
||||||
super(X86Macroop, self).__init__(name)
|
super(X86Macroop, self).__init__(name)
|
||||||
self.directives = {
|
self.directives = {
|
||||||
"adjust_env" : self.setAdjustEnv,
|
"adjust_env" : self.setAdjustEnv,
|
||||||
"adjust_imm" : self.adjustImm,
|
"adjust_imm" : self.adjustImm,
|
||||||
"adjust_disp" : self.adjustDisp
|
"adjust_disp" : self.adjustDisp,
|
||||||
|
"serializing" : self.serializing
|
||||||
}
|
}
|
||||||
self.declared = False
|
self.declared = False
|
||||||
self.adjust_env = ""
|
self.adjust_env = ""
|
||||||
|
@ -159,6 +162,7 @@ let {{
|
||||||
//This is to pacify gcc in case the displacement isn't used.
|
//This is to pacify gcc in case the displacement isn't used.
|
||||||
adjustedDisp = adjustedDisp;
|
adjustedDisp = adjustedDisp;
|
||||||
'''
|
'''
|
||||||
|
self.serializing = False
|
||||||
def getAllocator(self, env):
|
def getAllocator(self, env):
|
||||||
return "new X86Macroop::%s(machInst, %s)" % \
|
return "new X86Macroop::%s(machInst, %s)" % \
|
||||||
(self.name, env.getAllocator())
|
(self.name, env.getAllocator())
|
||||||
|
@ -188,6 +192,9 @@ let {{
|
||||||
flags = ["IsMicroop"]
|
flags = ["IsMicroop"]
|
||||||
if micropc == numMicroops - 1:
|
if micropc == numMicroops - 1:
|
||||||
flags.append("IsLastMicroop")
|
flags.append("IsLastMicroop")
|
||||||
|
if self.serializing:
|
||||||
|
flags.append("IsSerializing")
|
||||||
|
flags.append("IsSerializeAfter")
|
||||||
else:
|
else:
|
||||||
flags.append("IsDelayedCommit")
|
flags.append("IsDelayedCommit")
|
||||||
if micropc == 0:
|
if micropc == 0:
|
||||||
|
|
Loading…
Reference in a new issue