Upload Tizen:Base source
[external/binutils.git] / gas / testsuite / gas / ia64 / opc-f.pl
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",
17              "fadd", "fadd.s", "fadd.d",
18              "fsub", "fsub.s", "fsub.d",
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 @fctype = ( "", ".unc" );
55
56 foreach $c (@cmp) {
57   foreach $u (@fctype) {
58     foreach $s (@sf) {
59       print "\tfcmp${c}${u}${s} p3, p4 = f4, f5\n";
60     }
61   }
62   print "\n";
63 }
64
65 # Floating Point Class
66
67 foreach $u (@fctype) {
68   foreach $c ( '@nat', '@qnan', '@snan', '@pos', '@neg', '@unorm',
69                '@norm', '@inf', '0x1ff' ) {
70     foreach $m ( ".m", ".nm" ) {
71       print "\tfclass${m}${u} p3, p4 = f4, $c\n";
72     }
73   }
74   print "\n";
75 }
76
77 # Approximation
78
79 foreach $i ( "frcpa", "fprcpa" ) {
80   foreach $s (@sf) {
81     print "\t${i}${s} f4, p5 = f6, f7\n";
82   }
83   print "\n";
84 }
85
86 foreach $i ( "frsqrta", "fprsqrta" ) {
87   foreach $s (@sf) {
88     print "\t${i}${s} f4, p5 = f6\n";
89   }
90   print "\n";
91 }
92
93 # Min/Max
94
95 foreach $i ( "fmin", "fmax", "famin", "famax",
96              "fpmin", "fpmax", "fpamin", "fpamax" ) {
97   foreach $s (@sf) {
98     print "\t${i}${s} f4 = f5, f6\n";
99   }
100   print "\n";
101 }
102
103 # Parallel Compare
104
105 foreach $c (@cmp) {
106   foreach $s (@sf) {
107     print "\tfpcmp${c}${s} f3 = f4, f5\n";
108   }
109   print "\n";
110 }
111
112 # Merge and Logical
113
114 foreach $i ( "fmerge.s", "fmerge.ns", "fmerge.se", "fmix.lr", "fmix.r",
115              "fmix.l", "fsxt.l", "fpack", "fswap", "fswap.nl", "fswap.nr",
116              "fand", "fandcm", "for", "fxor", "fpmerge.s", "fpmerge.ns",
117              "fpmerge.se" ) {
118   print "\t$i f4 = f5, f6\n";
119 }
120 print "\n";
121
122 foreach $i ( "fabs", "fneg", "fnegabs", "fpabs", "fpneg", "fpnegabs" ) {
123   print "\t$i f4 = f5\n";
124 }
125 print "\n";
126
127 # Convert Floating to Fixed
128
129 foreach $b ( "fcvt", "fpcvt" ) {
130   foreach $f ( ".fx", ".fxu" ) {
131     foreach $t ( "", ".trunc" ) {
132       foreach $s (@sf) {
133         print "\t${b}${f}${t}${s} f4 = f5\n";
134       }
135       print "\n";
136     }
137   }
138 }
139
140 # Convert Fixed to Floating
141
142 foreach $e ( ".xf", ".xuf" ) {
143   print "\tfcvt$e f4 = f5\n";
144 }
145 print "\n";
146
147 # Set Controls
148
149 foreach $s (@sf) {
150   print "\tfsetc$s 0, 0\n";
151   print "\tfsetc$s 0x3f, 0x3f\n";
152 }
153 print "\n";
154
155 # Clear flags
156
157 foreach $s (@sf) {
158   print "\tfclrf$s\n";
159 }
160 print "\n";
161
162 # Check flags
163
164 foreach $s (@sf) {
165   print "\tfchkf$s _start\n";
166 }
167 print "\n";
168
169 # Misc
170
171 print "\tbreak.f 0\n";
172 print "\tnop.f 0;;\n";
173 print "\n";
174