X86: Implement mov from control register.
--HG-- extra : convert_revision : c8280f0686a3ae6d5c405327540ad15a3a5531f9
This commit is contained in:
parent
fe833dd2c3
commit
988c6f227a
3 changed files with 17 additions and 1 deletions
|
@ -216,7 +216,7 @@
|
|||
0x04: decode LEGACY_DECODEVAL {
|
||||
// no prefix
|
||||
0x0: decode OPCODE_OP_BOTTOM3 {
|
||||
0x0: mov_Rd_Cd();
|
||||
0x0: Inst::MOV(Rd,Cd);
|
||||
0x1: mov_Rd_Dd();
|
||||
0x2: Inst::MOV(Cd,Rd);
|
||||
0x3: mov_Dd_Rd();
|
||||
|
|
|
@ -193,6 +193,10 @@ def macroop MOV_C_R {
|
|||
wrcr reg, regm
|
||||
};
|
||||
|
||||
def macroop MOV_R_C {
|
||||
rdcr reg, regm
|
||||
};
|
||||
|
||||
def macroop MOV_R_S {
|
||||
rdsel reg, regm
|
||||
};
|
||||
|
|
|
@ -885,6 +885,18 @@ let {{
|
|||
class Zext(RegOp):
|
||||
code = 'DestReg = bits(psrc1, op2, 0);'
|
||||
|
||||
class Rdcr(RegOp):
|
||||
def __init__(self, dest, src1, flags=None, dataSize="env.dataSize"):
|
||||
super(Rdcr, self).__init__(dest, \
|
||||
src1, "NUM_INTREGS", flags, dataSize)
|
||||
code = '''
|
||||
if (dest == 1 || (dest > 4 && dest < 8) || (dest > 8)) {
|
||||
fault = new InvalidOpcode();
|
||||
} else {
|
||||
DestReg = ControlSrc1;
|
||||
}
|
||||
'''
|
||||
|
||||
class Wrcr(RegOp):
|
||||
def __init__(self, dest, src1, flags=None, dataSize="env.dataSize"):
|
||||
super(Wrcr, self).__init__(dest, \
|
||||
|
|
Loading…
Reference in a new issue