handle xmm instructions

This commit is contained in:
Michael McLoughlin
2018-11-21 22:28:55 -06:00
parent 836252fa13
commit c30d7fb743
4 changed files with 73 additions and 29 deletions

View File

@@ -16,11 +16,16 @@ func (l LoaderTest) Generate(w io.Writer, is []*inst.Instruction) error {
for _, i := range is {
p.printf("\t// %s %s\n", i.Opcode, i.Summary)
if strings.HasPrefix(i.Opcode, "RET") {
p.printf("\t// SKIP: early RET instruction would cause assembler error")
continue
}
for _, f := range i.Forms {
as := args(f.Operands)
p.printf("\t// %#v\n", f.Operands)
if as == nil {
p.printf("\t// skip\n")
p.printf("\t// SKIP:\n")
continue
}
p.printf("\t%s\t%s\n", i.Opcode, strings.Join(as, ", "))
@@ -66,11 +71,10 @@ func arg(t string) string {
// <xs:enumeration value="r32" />
// <xs:enumeration value="r32l" />
// <xs:enumeration value="rax" />
// <xs:enumeration value="r64" />
"r64": "R8",
"r64": "R15", // <xs:enumeration value="r64" />
// <xs:enumeration value="mm" />
// <xs:enumeration value="xmm0" />
// <xs:enumeration value="xmm" />
"xmm": "X7", // <xs:enumeration value="xmm" />
// <xs:enumeration value="xmm{k}" />
// <xs:enumeration value="xmm{k}{z}" />
// <xs:enumeration value="ymm" />