{
# Make the default data size of calls 64 bits in 64 bit mode
.adjust_env oszIn64Override
+ .function_call
limm t1, imm
rdip t7
{
# Make the default data size of calls 64 bits in 64 bit mode
.adjust_env oszIn64Override
+ .function_call
rdip t1
# Check target of call
{
# Make the default data size of calls 64 bits in 64 bit mode
.adjust_env oszIn64Override
+ .function_call
rdip t7
ld t1, seg, sib, disp
{
# Make the default data size of calls 64 bits in 64 bit mode
.adjust_env oszIn64Override
+ .function_call
rdip t7
ld t1, seg, riprel, disp
{
# Make the default data size of rets 64 bits in 64 bit mode
.adjust_env oszIn64Override
+ .function_return
ld t1, ss, [1, t0, rsp]
# Check address of return
{
# Make the default data size of rets 64 bits in 64 bit mode
.adjust_env oszIn64Override
+ .function_return
limm t2, imm
ld t1, ss, [1, t0, rsp]
def macroop RET_FAR {
.adjust_env oszIn64Override
+ .function_return
# Get the return RIP
ld t1, ss, [1, t0, rsp]
wrdl cs, t3, t2
wrsel cs, t2
wrip t0, t1
- br label("end")
+# br label("end")
# Do other stuff if they're not.
-end:
- fault "NoFault"
+#end:
+# fault "NoFault"
};
'''
self.adjust_disp += val
def serializing(self):
self.serializing = True
+
+ def function_call(self):
+ self.function_call = True
+ def function_return(self):
+ self.function_return = True
+
def __init__(self, name):
super(X86Macroop, self).__init__(name)
self.directives = {
"adjust_env" : self.setAdjustEnv,
"adjust_imm" : self.adjustImm,
"adjust_disp" : self.adjustDisp,
- "serializing" : self.serializing
+ "serializing" : self.serializing,
+ "function_call" : self.function_call,
+ "function_return" : self.function_return
}
self.declared = False
self.adjust_env = ""
adjustedDisp = adjustedDisp;
'''
self.serializing = False
+ self.function_call = False
+ self.function_return = False
+
def getAllocator(self, env):
return "new X86Macroop::%s(machInst, %s)" % \
(self.name, env.getAllocator())
flags = ["IsMicroop"]
if micropc == numMicroops - 1:
flags.append("IsLastMicroop")
+
if self.serializing:
flags.append("IsSerializing")
flags.append("IsSerializeAfter")
+
+ if self.function_call:
+ flags.append("IsCall")
+ if self.function_return:
+ flags.append("IsReturn")
else:
flags.append("IsDelayedCommit")
if micropc == 0: