Added New regs.pl, and associated modules
[nasm/perl-rewrite.git] / perl / t / regs / list.t
blob915468e36c3481f2b17f5b4251fd1c3d475fe64d
1 use strict;
2 use warnings;
3 use YAML::XS ':all';
6 use Test::More tests => 1;
7 #eval "use Test::More 'tests' => ".(3 * scalar keys %test);
8 die $@ if $@;
11 my $reference;
12 my $dat_string;
14   local $/ = "...\n";
15   my $datastream;
16   
17   ($datastream,$dat_string) = <DATA>;
18   $reference = Load($datastream);
21 my $got_str = `echo "$dat_string" | perl regs.pl yaml -`;
23 my $yaml = Load $got_str;
25 for my $elem (values %$yaml){
26   delete $elem->{Index};
29 is_deeply $yaml, $reference;
31 __DATA__
32 ---
33 xmm0:
34   AssemblerClass: XMM0
35   DisassemberClasses:
36   - xmmreg
37   x86RegisterNumber: 0
38 xmm1:
39   AssemblerClass: XMMREG
40   DisassemberClasses:
41   - xmmreg
42   x86RegisterNumber: 1
43 xmm10:
44   AssemblerClass: XMMREG
45   DisassemberClasses:
46   - xmmreg
47   x86RegisterNumber: 10
48 xmm11:
49   AssemblerClass: XMMREG
50   DisassemberClasses:
51   - xmmreg
52   x86RegisterNumber: 11
53 xmm12:
54   AssemblerClass: XMMREG
55   DisassemberClasses:
56   - xmmreg
57   x86RegisterNumber: 12
58 xmm13:
59   AssemblerClass: XMMREG
60   DisassemberClasses:
61   - xmmreg
62   x86RegisterNumber: 13
63 xmm14:
64   AssemblerClass: XMMREG
65   DisassemberClasses:
66   - xmmreg
67   x86RegisterNumber: 14
68 xmm15:
69   AssemblerClass: XMMREG
70   DisassemberClasses:
71   - xmmreg
72   x86RegisterNumber: 15
73 xmm2:
74   AssemblerClass: XMMREG
75   DisassemberClasses:
76   - xmmreg
77   x86RegisterNumber: 2
78 xmm3:
79   AssemblerClass: XMMREG
80   DisassemberClasses:
81   - xmmreg
82   x86RegisterNumber: 3
83 xmm4:
84   AssemblerClass: XMMREG
85   DisassemberClasses:
86   - xmmreg
87   x86RegisterNumber: 4
88 xmm5:
89   AssemblerClass: XMMREG
90   DisassemberClasses:
91   - xmmreg
92   x86RegisterNumber: 5
93 xmm6:
94   AssemblerClass: XMMREG
95   DisassemberClasses:
96   - xmmreg
97   x86RegisterNumber: 6
98 xmm7:
99   AssemblerClass: XMMREG
100   DisassemberClasses:
101   - xmmreg
102   x86RegisterNumber: 7
103 xmm8:
104   AssemblerClass: XMMREG
105   DisassemberClasses:
106   - xmmreg
107   x86RegisterNumber: 8
108 xmm9:
109   AssemblerClass: XMMREG
110   DisassemberClasses:
111   - xmmreg
112   x86RegisterNumber: 9
114 xmm0    XMM0    xmmreg  0
115 xmm1-15 XMMREG  xmmreg  1