add some encoding fields to Opcodes XML reader

This commit is contained in:
Michael McLoughlin
2018-11-21 21:38:19 -06:00
parent 59e6af7d36
commit 836252fa13
2 changed files with 44 additions and 3 deletions

View File

@@ -45,6 +45,7 @@ type Form struct {
Operands []Operand `xml:"Operand"`
ImplicitOperands []ImplicitOperand `xml:"ImplicitOperand"`
ISA []ISA `xml:"ISA"`
Encoding Encoding `xml:"Encoding"`
}
type Operand struct {
@@ -62,3 +63,45 @@ type ImplicitOperand struct {
type ISA struct {
ID string `xml:"id,attr"`
}
type Encoding struct {
REX *REX `xml:"REX"`
VEX *VEX `xml:"VEX"`
EVEX *EVEX `xml:"EVEX"`
}
type REX struct {
Mandatory bool `xml:"mandatory,attr"`
W int `xml:"W,attr"`
R string `xml:"R,attr"`
X string `xml:"X,attr"`
B string `xml:"B,attr"`
}
type VEX struct {
Type string `xml:"type,attr"`
W int `xml:"W,attr"`
L int `xml:"L,attr"`
M5 string `xml:"m-mmmm,attr"`
PP string `xml:"pp,attr"`
R string `xml:"R,attr"`
X string `xml:"X,attr"`
B string `xml:"B,attr"`
V4 string `xml:"vvvv,attr"`
}
type EVEX struct {
M2 string `xml:"mm,attr"`
PP string `xml:"pp,attr"`
W int `xml:"W,attr"`
LL string `xml:"LL,attr"`
V4 string `xml:"vvvv,attr"`
V string `xml:"V,attr"`
RR string `xml:"RR,attr"`
B string `xml:"B,attr"`
X string `xml:"X,attr"`
Bsml string `xml:"b,attr"`
A3 string `xml:"aaa,attr"`
Z string `xml:"Z,attr"`
Disp8xN string `xml:"disp8xN,attr"`
}