func allowedMismatchXed(text string, size int, inst *Inst, dec ExtInst) bool {
	if (contains(text, "error:") || isPrefix(text) && size == 1) && contains(dec.text, "GENERAL_ERROR", "INSTR_TOO_LONG", "BAD_LOCK_PREFIX") {
		return true
	}
	if contains(dec.text, "BAD_LOCK_PREFIX") && countExactPrefix(inst, PrefixLOCK|PrefixInvalid) > 0 {
		return true
	}
	if contains(dec.text, "BAD_LOCK_PREFIX", "GENERAL_ERROR") && countExactPrefix(inst, PrefixLOCK|PrefixImplicit) > 0 {
		return true
	}
	if text == "lock" && size == 1 && contains(dec.text, "BAD_LOCK_PREFIX") {
		return true
	}
	if (contains(text, "error:") || isPrefix(text) && size == 1) && contains(dec.text, unsupported...) {
		return true
	}
	if contains(text, xedUnsupported...) && contains(dec.text, "ERROR") {
		return true
	}
	if (contains(text, "error:") || isPrefix(text) && size == 1) && contains(dec.text, "shl ") && (inst.Opcode>>16)&0xEC38 == 0xC030 {
		return true
	}
	if (contains(text, "error:") || isPrefix(text) && size == 1) && hasByte(dec.enc[:dec.nenc], 0x82, 0xC0, 0xC1, 0xD0, 0xD1, 0xD2, 0xD3, 0xF6, 0xF7) {
		return true
	}
	if (text == "rep" && dec.enc[0] == 0xF3 || (text == "repn" || text == "repne") && dec.enc[0] == 0xF2) && (!contains(dec.text, "ins", "outs", "movs", "lods", "cmps", "scas") || contains(dec.text, "xmm")) {
		return true
	}
	if contains(text, "rdrand") && contains(dec.text, "vmptrld", "vmxon", "vmclear") {
		return true
	}
	if contains(text, "rdfsbase", "rdgsbase", "wrfsbase", "wrgsbase") && contains(dec.text, "ERROR") {
		return true
	}
	if contains(text, "swapgs") {
		return true
	}
	if contains(text, "cr1", "cr5", "cr6", "cr7", "tr0", "tr1", "tr2", "tr3", "tr4", "tr5", "tr6", "tr7") && contains(dec.text, "ERROR") {
		return true
	}
	if (contains(text, "error:") || isPrefix(text) && size == 1) && contains(dec.text, "nop ") && (inst.Opcode>>8)&0xFFFF38 != 0x0F1F00 {
		return true
	}
	if contains(text, "clflush") && contains(dec.text, "clflushopt") {
		return true
	}
	if text == dec.text && size > dec.nenc && contains(text, " cr", " dr", " tr") {
		return true
	}
	if contains(dec.text, "fence") && hasByte(dec.enc[:dec.nenc], 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF) {
		return true
	}
	if (contains(text, "error:") || isPrefix(text) && size == 1) && contains(dec.text, "fxch ") && hasByte(dec.enc[:dec.nenc], 0xDD, 0xDF) {
		return true
	}
	if (contains(text, "error:") || isPrefix(text) && size == 1) && contains(dec.text, "fcom ") && hasByte(dec.enc[:dec.nenc], 0xD8, 0xDC) {
		return true
	}
	if (contains(text, "error:") || isPrefix(text) && size == 1) && contains(dec.text, "fcomp ") && hasByte(dec.enc[:dec.nenc], 0xDC, 0xDE) {
		return true
	}
	if (contains(text, "error:") || isPrefix(text) && size == 1) && contains(dec.text, "fstp ") && hasByte(dec.enc[:dec.nenc], 0xDF) {
		return true
	}
	return false
}
allowedMismatchXed reports whether the mismatch between text and dec
should be allowed by the test.
package x86asm
import (
	"bytes"
	"strings"
	"testing"
)
func TestXed32Manual(t *testing.T)   { testXed32(t, hexCases(t, xedManualTests)) }
func TestXed32Testdata(t *testing.T) { testXed32(t, concat(basicPrefixes, testdataCases(t))) }
func TestXed32ModRM(t *testing.T)    { testXed32(t, concat(basicPrefixes, enumModRM)) }
func TestXed32OneByte(t *testing.T)  { testBasic(t, testXed32) }
func TestXed320F(t *testing.T)       { testBasic(t, testXed32, 0x0F) }
func TestXed320F38(t *testing.T)     { testBasic(t, testXed32, 0x0F, 0x38) }
func TestXed320F3A(t *testing.T)     { testBasic(t, testXed32, 0x0F, 0x3A) }
func TestXed32Prefix(t *testing.T)   { testPrefix(t, testXed32) }
func TestXed64Manual(t *testing.T)   { testXed64(t, hexCases(t, xedManualTests)) }
func TestXed64Testdata(t *testing.T) { testXed64(t, concat(basicPrefixes, testdataCases(t))) }
func TestXed64ModRM(t *testing.T)    { testXed64(t, concat(basicPrefixes, enumModRM)) }
func TestXed64OneByte(t *testing.T)  { testBasic(t, testXed64) }
func TestXed640F(t *testing.T)       { testBasic(t, testXed64, 0x0F) }
func TestXed640F38(t *testing.T)     { testBasic(t, testXed64, 0x0F, 0x38) }
func TestXed640F3A(t *testing.T)     { testBasic(t, testXed64, 0x0F, 0x3A) }
func TestXed64Prefix(t *testing.T)   { testPrefix(t, testXed64) }
func TestXed64REXTestdata(t *testing.T) {
	testXed64(t, filter(concat3(basicPrefixes, rexPrefixes, testdataCases(t)), isValidREX))
}
func TestXed64REXModRM(t *testing.T)   { testXed64(t, concat3(basicPrefixes, rexPrefixes, enumModRM)) }
func TestXed64REXOneByte(t *testing.T) { testBasicREX(t, testXed64) }
func TestXed64REX0F(t *testing.T)      { testBasicREX(t, testXed64, 0x0F) }
func TestXed64REX0F38(t *testing.T)    { testBasicREX(t, testXed64, 0x0F, 0x38) }
func TestXed64REX0F3A(t *testing.T)    { testBasicREX(t, testXed64, 0x0F, 0x3A) }
func TestXed64REXPrefix(t *testing.T)  { testPrefixREX(t, testXed64) }
var xedManualTests = `
6690
`