X86: Make microcode use presegmentation RIPs and the rest of m5 use post segmentation RIPS.
--HG-- extra : convert_revision : d8cda7c8b9a2afb8a9d601b6d61529a96c5f87fe
This commit is contained in:
parent
1048b548fa
commit
5772e3cada
|
@ -835,7 +835,7 @@ let {{
|
||||||
'''
|
'''
|
||||||
|
|
||||||
class Wrip(WrRegOp, CondRegOp):
|
class Wrip(WrRegOp, CondRegOp):
|
||||||
code = 'RIP = psrc1 + sop2'
|
code = 'RIP = psrc1 + sop2 + CSBase'
|
||||||
else_code="RIP = RIP;"
|
else_code="RIP = RIP;"
|
||||||
|
|
||||||
class Br(WrRegOp, CondRegOp):
|
class Br(WrRegOp, CondRegOp):
|
||||||
|
@ -846,7 +846,7 @@ let {{
|
||||||
code = 'ccFlagBits = psrc1 ^ op2'
|
code = 'ccFlagBits = psrc1 ^ op2'
|
||||||
|
|
||||||
class Rdip(RdRegOp):
|
class Rdip(RdRegOp):
|
||||||
code = 'DestReg = RIP'
|
code = 'DestReg = RIP - CSBase'
|
||||||
|
|
||||||
class Ruflags(RdRegOp):
|
class Ruflags(RdRegOp):
|
||||||
code = 'DestReg = ccFlagBits'
|
code = 'DestReg = ccFlagBits'
|
||||||
|
|
|
@ -126,5 +126,6 @@ def operands {{
|
||||||
'ControlSrc1': ('ControlReg', 'uqw', 'MISCREG_CR(src1)', (None, None, ['IsSerializeAfter','IsSerializing','IsNonSpeculative']), 72),
|
'ControlSrc1': ('ControlReg', 'uqw', 'MISCREG_CR(src1)', (None, None, ['IsSerializeAfter','IsSerializing','IsNonSpeculative']), 72),
|
||||||
'EferOp': ('ControlReg', 'uqw', 'MISCREG_EFER', (None, None, ['IsSerializeAfter','IsSerializing','IsNonSpeculative']), 73),
|
'EferOp': ('ControlReg', 'uqw', 'MISCREG_EFER', (None, None, ['IsSerializeAfter','IsSerializing','IsNonSpeculative']), 73),
|
||||||
'CR4Op': ('ControlReg', 'uqw', 'MISCREG_CR4', (None, None, ['IsSerializeAfter','IsSerializing','IsNonSpeculative']), 74),
|
'CR4Op': ('ControlReg', 'uqw', 'MISCREG_CR4', (None, None, ['IsSerializeAfter','IsSerializing','IsNonSpeculative']), 74),
|
||||||
|
'CSBase': ('ControlReg', 'udw', 'MISCREG_CS_BASE', (None, None, ['IsSerializeAfter','IsSerializing','IsNonSpeculative']), 80),
|
||||||
'Mem': ('Mem', 'uqw', None, ('IsMemRef', 'IsLoad', 'IsStore'), 100)
|
'Mem': ('Mem', 'uqw', None, ('IsMemRef', 'IsLoad', 'IsStore'), 100)
|
||||||
}};
|
}};
|
||||||
|
|
|
@ -461,6 +461,8 @@ X86LiveProcess::argsInit(int intSize, int pageSize)
|
||||||
threadContexts[0]->setIntReg(StackPointerReg, stack_min);
|
threadContexts[0]->setIntReg(StackPointerReg, stack_min);
|
||||||
|
|
||||||
Addr prog_entry = objFile->entryPoint();
|
Addr prog_entry = objFile->entryPoint();
|
||||||
|
// There doesn't need to be any segment base added in since we're dealing
|
||||||
|
// with the flat segmentation model.
|
||||||
threadContexts[0]->setPC(prog_entry);
|
threadContexts[0]->setPC(prog_entry);
|
||||||
threadContexts[0]->setNextPC(prog_entry + sizeof(MachInst));
|
threadContexts[0]->setNextPC(prog_entry + sizeof(MachInst));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue