gas2ack support for rdmsr and wrmsr
This commit is contained in:
parent
cb9faaebfd
commit
d653cb457f
@ -152,6 +152,7 @@ typedef enum opcode { /* 80486 opcodes, from the i486 reference manual.
|
|||||||
PUSHF,
|
PUSHF,
|
||||||
RCL, RCR, ROL, ROR,
|
RCL, RCR, ROL, ROR,
|
||||||
RET, RETF, /* RETF added */
|
RET, RETF, /* RETF added */
|
||||||
|
RDMSR,
|
||||||
SAHF,
|
SAHF,
|
||||||
SAL, SAR, SHL, SHR,
|
SAL, SAR, SHL, SHR,
|
||||||
SBB,
|
SBB,
|
||||||
@ -173,6 +174,7 @@ typedef enum opcode { /* 80486 opcodes, from the i486 reference manual.
|
|||||||
VERR, VERW,
|
VERR, VERW,
|
||||||
WAIT,
|
WAIT,
|
||||||
WBINVD,
|
WBINVD,
|
||||||
|
WRMSR,
|
||||||
XADD,
|
XADD,
|
||||||
XCHG,
|
XCHG,
|
||||||
XLAT,
|
XLAT,
|
||||||
|
@ -249,6 +249,7 @@ static mnemonic_t mnemtab[] = {
|
|||||||
{ RCR, "rcr%" },
|
{ RCR, "rcr%" },
|
||||||
{ RET, "ret" },
|
{ RET, "ret" },
|
||||||
{ RETF, "retf" },
|
{ RETF, "retf" },
|
||||||
|
{ RDMSR, "rdmsr" },
|
||||||
{ ROL, "rol%" },
|
{ ROL, "rol%" },
|
||||||
{ ROR, "ror%" },
|
{ ROR, "ror%" },
|
||||||
{ SAHF, "sahf" },
|
{ SAHF, "sahf" },
|
||||||
@ -291,6 +292,7 @@ static mnemonic_t mnemtab[] = {
|
|||||||
{ VERW, "verw" },
|
{ VERW, "verw" },
|
||||||
{ WAIT, "wait" },
|
{ WAIT, "wait" },
|
||||||
{ WBINVD, "wbinvd" },
|
{ WBINVD, "wbinvd" },
|
||||||
|
{ WRMSR, "wrmsr" },
|
||||||
{ XADD, "xadd" },
|
{ XADD, "xadd" },
|
||||||
{ XCHG, "xchg%" },
|
{ XCHG, "xchg%" },
|
||||||
{ XLAT, "xlat" },
|
{ XLAT, "xlat" },
|
||||||
@ -605,6 +607,14 @@ void ack_emit_instruction(asm86_t *a)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (a->opcode == RDMSR) {
|
||||||
|
ack_printf(".data1 0x0f, 0x32\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (a->opcode == WRMSR) {
|
||||||
|
ack_printf(".data1 0x0f, 0x30\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
/* we are translating from GNU */
|
/* we are translating from GNU */
|
||||||
if (a->args && a->args->operator == ','
|
if (a->args && a->args->operator == ','
|
||||||
/* don't swap ljmp prefixed with segment */
|
/* don't swap ljmp prefixed with segment */
|
||||||
|
@ -335,6 +335,7 @@ static mnemonic_t mnemtab[] = { /* This array is sorted. */
|
|||||||
{ "rcrw", RCR, OWORD },
|
{ "rcrw", RCR, OWORD },
|
||||||
{ "ret", RET, JUMP },
|
{ "ret", RET, JUMP },
|
||||||
{ "retf", RETF, JUMP },
|
{ "retf", RETF, JUMP },
|
||||||
|
{ "rdmsr", RDMSR, WORD },
|
||||||
{ "rolb", ROL, BYTE },
|
{ "rolb", ROL, BYTE },
|
||||||
{ "roll", ROL, WORD },
|
{ "roll", ROL, WORD },
|
||||||
{ "rolw", ROL, OWORD },
|
{ "rolw", ROL, OWORD },
|
||||||
@ -407,6 +408,7 @@ static mnemonic_t mnemtab[] = { /* This array is sorted. */
|
|||||||
{ "verw", VERW, WORD },
|
{ "verw", VERW, WORD },
|
||||||
{ "wait", WAIT, WORD },
|
{ "wait", WAIT, WORD },
|
||||||
{ "wbinvd", WBINVD, WORD },
|
{ "wbinvd", WBINVD, WORD },
|
||||||
|
{ "wrmsr", WRMSR, WORD },
|
||||||
{ "xadd", XADD, WORD },
|
{ "xadd", XADD, WORD },
|
||||||
{ "xchgb", XCHG, BYTE },
|
{ "xchgb", XCHG, BYTE },
|
||||||
{ "xchgl", XCHG, WORD },
|
{ "xchgl", XCHG, WORD },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user