1
2
3
4
5 package x86asm
6
7 import (
8 "strings"
9 "testing"
10 )
11
12 func TestPlan932Manual(t *testing.T) { testPlan932(t, hexCases(t, plan9ManualTests)) }
13 func TestPlan932Testdata(t *testing.T) { testPlan932(t, concat(basicPrefixes, testdataCases(t))) }
14 func TestPlan932ModRM(t *testing.T) { testPlan932(t, concat(basicPrefixes, enumModRM)) }
15 func TestPlan932OneByte(t *testing.T) { testBasic(t, testPlan932) }
16 func TestPlan9320F(t *testing.T) { testBasic(t, testPlan932, 0x0F) }
17 func TestPlan9320F38(t *testing.T) { testBasic(t, testPlan932, 0x0F, 0x38) }
18 func TestPlan9320F3A(t *testing.T) { testBasic(t, testPlan932, 0x0F, 0x3A) }
19 func TestPlan932Prefix(t *testing.T) { testPrefix(t, testPlan932) }
20
21 func TestPlan964Manual(t *testing.T) { testPlan964(t, hexCases(t, plan9ManualTests)) }
22 func TestPlan964Testdata(t *testing.T) { testPlan964(t, concat(basicPrefixes, testdataCases(t))) }
23 func TestPlan964ModRM(t *testing.T) { testPlan964(t, concat(basicPrefixes, enumModRM)) }
24 func TestPlan964OneByte(t *testing.T) { testBasic(t, testPlan964) }
25 func TestPlan9640F(t *testing.T) { testBasic(t, testPlan964, 0x0F) }
26 func TestPlan9640F38(t *testing.T) { testBasic(t, testPlan964, 0x0F, 0x38) }
27 func TestPlan9640F3A(t *testing.T) { testBasic(t, testPlan964, 0x0F, 0x3A) }
28 func TestPlan964Prefix(t *testing.T) { testPrefix(t, testPlan964) }
29
30 func TestPlan964REXTestdata(t *testing.T) {
31 testPlan964(t, filter(concat3(basicPrefixes, rexPrefixes, testdataCases(t)), isValidREX))
32 }
33 func TestPlan964REXModRM(t *testing.T) {
34 testPlan964(t, concat3(basicPrefixes, rexPrefixes, enumModRM))
35 }
36 func TestPlan964REXOneByte(t *testing.T) { testBasicREX(t, testPlan964) }
37 func TestPlan964REX0F(t *testing.T) { testBasicREX(t, testPlan964, 0x0F) }
38 func TestPlan964REX0F38(t *testing.T) { testBasicREX(t, testPlan964, 0x0F, 0x38) }
39 func TestPlan964REX0F3A(t *testing.T) { testBasicREX(t, testPlan964, 0x0F, 0x3A) }
40 func TestPlan964REXPrefix(t *testing.T) { testPrefixREX(t, testPlan964) }
41
42
43
44
45 var plan9ManualTests = `
46 `
47
48
49
50 func allowedMismatchPlan9(text string, size int, inst *Inst, dec ExtInst) bool {
51 return false
52 }
53
54
55 var plan9Unsupported = strings.Fields(`
56 `)
57
View as plain text