Commit | Line | Data |
---|---|---|
800eeca4 JW |
1 | print ".text\n\t.type _start,@", "function\n_start:\n\n"; |
2 | ||
3 | @sf = ( "", ".s0", ".s1", ".s2", ".s3" ); | |
4 | ||
5 | # Arithmetic | |
6 | ||
7 | foreach $i ( "fma", "fma.s", "fma.d", "fpma", | |
8 | "fms", "fms.s", "fms.d", "fpms", | |
9 | "fnma", "fnma.s", "fnma.d", "fpnma" ) { | |
10 | foreach $s (@sf) { | |
11 | print "\t${i}${s} f4 = f5, f6, f7\n"; | |
12 | } | |
13 | print "\n"; | |
14 | } | |
15 | ||
16 | foreach $i ( "fmpy", "fmpy.s", "fmpy.d", "fpmpy", | |
50b81f19 JW |
17 | "fadd", "fadd.s", "fadd.d", |
18 | "fsub", "fsub.s", "fsub.d", | |
800eeca4 JW |
19 | "fnmpy", "fnmpy.s", "fnmpy.d", "fpnmpy" ) { |
20 | foreach $s (@sf) { | |
21 | print "\t${i}${s} f4 = f5, f6\n"; | |
22 | } | |
23 | print "\n"; | |
24 | } | |
25 | ||
26 | foreach $i ( "fnorm", "fnorm.s", "fnorm.d" ) { | |
27 | foreach $s (@sf) { | |
28 | print "\t${i}${s} f4 = f5\n"; | |
29 | } | |
30 | print "\n"; | |
31 | } | |
32 | ||
33 | # Fixed Point Multiply Add | |
34 | ||
35 | foreach $s ( ".l", ".lu", ".h", ".hu" ) { | |
36 | print "\txma${s} f4 = f5, f6, f7\n"; | |
37 | } | |
38 | print "\n"; | |
39 | ||
40 | foreach $s ( ".l", ".lu", ".h", ".hu" ) { | |
41 | print "\txmpy${s} f4 = f5, f6\n"; | |
42 | } | |
43 | print "\n"; | |
44 | ||
45 | # Parallel Floating Point Select | |
46 | ||
47 | print "\tfselect f4 = f5, f6, f7\n\n"; | |
48 | ||
49 | # Floating Point Compare | |
50 | ||
51 | @cmp = ( ".eq", ".lt", ".le", ".unord", ".gt", ".ge", ".neq", ".nlt", | |
52 | ".nle", ".ngt", ".nge", ".ord" ); | |
53 | ||
54 | # Floating Point Class | |
55 | ||
56 | foreach $u ( "", ".unc" ) { | |
57 | foreach $c ( '@nat', '@qnan', '@snan', '@pos', '@neg', '@unorm', | |
58 | '@norm', '@inf', '0x1ff' ) { | |
59 | foreach $m ( ".m", ".nm" ) { | |
60 | print "\tfclass${m}${u} p3, p4 = f4, $c\n"; | |
61 | } | |
62 | } | |
63 | print "\n"; | |
64 | } | |
65 | ||
66 | # Approximation | |
67 | ||
68 | foreach $i ( "frcpa", "fprcpa" ) { | |
69 | foreach $s (@sf) { | |
70 | print "\t${i}${s} f4, p5 = f6, f7\n"; | |
71 | } | |
72 | print "\n"; | |
73 | } | |
74 | ||
75 | foreach $i ( "frsqrta", "fprsqrta" ) { | |
76 | foreach $s (@sf) { | |
77 | print "\t${i}${s} f4, p5 = f6\n"; | |
78 | } | |
79 | print "\n"; | |
80 | } | |
81 | ||
82 | # Min/Max | |
83 | ||
84 | foreach $i ( "fmin", "fmax", "famin", "famax", | |
85 | "fpmin", "fpmax", "fpamin", "fpamax" ) { | |
86 | foreach $s (@sf) { | |
87 | print "\t${i}${s} f4 = f5, f6\n"; | |
88 | } | |
89 | print "\n"; | |
90 | } | |
91 | ||
92 | # Parallel Compare | |
93 | ||
94 | foreach $c (@cmp) { | |
95 | foreach $s (@sf) { | |
96 | print "\tfcmp${c}${u}${s} p3, p4 = f4, f5\n"; | |
97 | } | |
98 | print "\n"; | |
99 | } | |
100 | ||
101 | # Merge and Logical | |
102 | ||
103 | foreach $i ( "fmerge.s", "fmerge.ns", "fmerge.se", "fmix.lr", "fmix.r", | |
104 | "fmix.l", "fsxt.l", "fpack", "fswap", "fswap.nl", "fswap.nr", | |
105 | "fand", "fandcm", "for", "fxor", "fpmerge.s", "fpmerge.ns", | |
106 | "fpmerge.se" ) { | |
107 | print "\t$i f4 = f5, f6\n"; | |
108 | } | |
109 | print "\n"; | |
110 | ||
111 | foreach $i ( "fabs", "fneg", "fnegabs", "fpabs", "fpneg", "fpnegabs" ) { | |
112 | print "\t$i f4 = f5\n"; | |
113 | } | |
114 | print "\n"; | |
115 | ||
116 | # Convert Floating to Fixed | |
117 | ||
118 | foreach $b ( "fcvt", "fpcvt" ) { | |
119 | foreach $f ( ".fx", ".fxu" ) { | |
120 | foreach $t ( "", ".trunc" ) { | |
121 | foreach $s (@sf) { | |
122 | print "\t${b}${f}${t}${s} f4 = f5\n"; | |
123 | } | |
124 | print "\n"; | |
125 | } | |
126 | } | |
127 | } | |
128 | ||
129 | # Convert Fixed to Floating | |
130 | ||
131 | foreach $e ( ".xf", ".xuf" ) { | |
132 | print "\tfcvt$e f4 = f5\n"; | |
133 | } | |
134 | print "\n"; | |
135 | ||
136 | # Set Controls | |
137 | ||
138 | foreach $s (@sf) { | |
139 | print "\tfsetc$s 0, 0\n"; | |
140 | print "\tfsetc$s 0x3f, 0x3f\n"; | |
141 | } | |
142 | print "\n"; | |
143 | ||
144 | # Clear flags | |
145 | ||
146 | foreach $s (@sf) { | |
147 | print "\tfclrf$s\n"; | |
148 | } | |
149 | print "\n"; | |
150 | ||
151 | # Check flags | |
152 | ||
153 | foreach $s (@sf) { | |
154 | print "\tfchkf$s _start\n"; | |
155 | } | |
156 | print "\n"; | |
157 | ||
158 | # Misc | |
159 | ||
160 | print "\tbreak.f 0\n"; | |
c4479208 | 161 | print "\tnop.f 0;;\n"; |
800eeca4 JW |
162 | print "\n"; |
163 |