OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [gas/] [testsuite/] [gas/] [bfin/] [arithmetic.s] - Blame information for rev 832

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
        .text
2
        .global abs
3
abs:
4
        a0 = abs a0;
5
        A0 = ABS A1;
6
        A1 = Abs a0;
7
        a1 = aBs A1;
8
        A1 = abs a1, a0 = ABS A0;
9
        r0 = abs r2;
10
 
11
        .text
12
        .global add
13
add:
14
        sp = sp + P0;
15
        SP = SP + P2;
16
        FP = p1 + fp;
17
 
18
        R7 = r7 + r2 (NS);
19
        r6 = r6 + r0 (s);
20
 
21
        r4.L = R2.h + r0.L (s);
22
        r5.H = R1.H + R1.L (S);
23
        r6.L = R6.L + r5.l (NS);
24
 
25
        .text
26
        .global add_sub_prescale_down
27
add_sub_prescale_down:
28
        r4.l = r0 + r1 (RND20);
29
        R3.H = r5 + r0 (rnd20);
30
        r1.L = r7 - R5 (rND20);
31
 
32
        .text
33
        .global add_sub_prescale_up
34
add_sub_prescale_up:
35
        r2.L = R0 + R1 (rnd12);
36
        r7.H = r7 + r6 (RND12);
37
        r5.l = r3 - R2 (rNd12);
38
        r2.h = R1 - R2 (Rnd12);
39
 
40
        .text
41
        .global add_immediate
42
add_immediate:
43
        R5 += -64;
44
        r2 += 63;
45
        i0 += 2;
46
        I3 += 2;
47
        I2 += 4;
48
        i1 += 4;
49
        P0 += 4;
50
        sp += 16;
51
        FP += -32;
52
 
53
        .text
54
        .global divide_primitive
55
divide_primitive:
56
        divs (r3, r5);
57
        divq (R3, R5);
58
 
59
        .text
60
        .global expadj
61
expadj:
62
        r6.L = EXPADJ (r5, r4.l);
63
        R5.l = ExpAdj (r0.h, r1.l);
64
        R4.L = expadj (R3, R5.L) (V);
65
 
66
        .text
67
        .global max
68
max:
69
        R6 = MAX (r5, R2);
70
        r0 = max (r1, r3);
71
 
72
        .text
73
        .global min
74
min:
75
        r5 = mIn (r2, R3);
76
        R4 = Min (r7, R0);
77
 
78
 
79
        .text
80
        .global modify_decrement
81
modify_decrement:
82
        A0 -= A1;
83
        a0 -= a1 (w32);
84
        fp -= p2;
85
        SP -= P0;
86
        I3 -= M0;
87
        i1 -= m1;
88
 
89
        .text
90
        .global modify_increment
91
modify_increment:
92
        a0 += a1;
93
        A0 += A1 (w32);
94
        Sp += P1 (Brev);
95
        P5 += Fp (BREV);
96
        i2 += M2;
97
        I0 += m0 (brev);
98
        r7 = ( a0 += a1);
99
        r6.l = (A0 += a1);
100
        R0.H = (a0 += A1);
101
 
102
        .text
103
        .global multiply16
104
multiply16:
105
        R0.l = r1.h * r2.l;
106
        r1.L = r5.H * r0.H (s2rnd);
107
        r7.l = r3.l * r3.H (FU);
108
        r4 = r2.H * r5.H (iSS2);
109
        r0 = r1.l * r3.l (is);
110
        r6 = R5.H * r0.l;
111
 
112
        r2.h = r7.l * r6.H (M, iu);
113
        r3.H = r5.H * r0.L;
114
        R0.H = r1.L * r1.H (M);
115
        r1 = r7.H * r6.L (M, is);
116
        R5 = r0.l * r2.h;
117
        r3 = r6.H * r0.H (m);
118
 
119
        .text
120
        .global multiply32
121
multiply32:
122
        R4 *= r0;
123
        r7 *= R2;
124
 
125
        .text
126
        .global multiply_accumulate
127
multiply_accumulate:
128
        a0 = r5.l * R7.H (w32);
129
        a0 = r0.h * r0.l;
130
        A0 += R2.L * r3.H (FU);
131
        A0 += r4.h * r1.L;
132
        a0 -= r7.l * r6.H (Is);
133
        A0 -= R5.H * r2.H;
134
 
135
        a1 = r1.L * r0.H (M);
136
        A1 = r2.h * r0.L;
137
        A1 = R7.H * R6.L (M, W32);
138
        a1 += r3.l * r2.l (fu);
139
        a1 += R6.H * r1.L;
140
        A1 -= r0.L * R3.H (is);
141
        a1 -= r2.l * r7.h;
142
 
143
        .text
144
        .global multiply_accumulate_half
145
multiply_accumulate_half:
146
        r7.l = (a0 = r6.H * r5.L);
147
        r0.L = (A0 = r1.h * R2.l) (tfu);
148
        R2.L = (a0 += r5.L * r4.L);
149
        r3.l = (A0 += r7.H * r6.h) (T);
150
        r0.l = (a0 -= r3.h * r2.h);
151
        r1.l = (a0 -= r5.L * r4.L) (iH);
152
 
153
        r1.H = (a1 = r1.l * R0.H);
154
        r2.h = (A1 = r0.H * r3.L) (M, Iss2);
155
        R6.H = (a1 += r7.l * r7.H);
156
        r7.h = (a1 += R2.L * R3.L) (S2rnd);
157
        r6.H = (A1 -= R4.h * r2.h);
158
        r5.h = (a1 -= r3.H * r7.L) (M, tFu);
159
 
160
        .text
161
        .global multiply_accumulate_data_reg
162
multiply_accumulate_data_reg:
163
        R0 = (A0 = R1.L * R2.L);
164
        R2 = (A0 = r1.l * r2.l) (is);
165
        r4 = (a0 += r7.h * r6.L);
166
        r6 = (A0 += R5.L * r3.h) (s2RND);
167
        R6 = (a0 -= r2.h * r7.l);
168
        r4 = (A0 -= R0.L * r6.H) (FU);
169
 
170
        r7 = (a1 = r0.h * r1.l);
171
        R5 = (A1 = r2.H * r3.H) (M, fu);
172
        R3 = (A1 += r7.l * r5.l);
173
        r1 = (a1 += r2.h * r7.h) (iss2);
174
        r3 = (A1 -= r0.l * R0.H);
175
        R5 = (a1 -= R2.l * R7.h) (m, is);
176
        r7 = (a1+=r1.h*r3.h);
177
 
178
        .text
179
        .global negate
180
negate:
181
        R5 = - r0;
182
        r7 = -R2(s);
183
        R7 = -r2(Ns);
184
        A0 = -A0;
185
        a0 = -a1;
186
        A1 = -A0;
187
        a1 = -A1;
188
        a1 = -a1, a0 = -a0;
189
 
190
        .text
191
        .global round_half
192
round_half:
193
        R5.L = r3 (rnd);
194
        r6.H = r0 (RND);
195
 
196
        .text
197
        .global saturate
198
saturate:
199
        A0 = A0 (S);
200
        a1 = a1 (s);
201
        A1 = a1 (S), a0 = A0 (s);
202
 
203
        .text
204
        .global signbits
205
signbits:
206
        R5.l = signbits r0;
207
        r0.L = SIGNbits r7.H;
208
        r3.l = signBits A0;
209
        r7.L = SIGNBITS a1;
210
 
211
        .text
212
        .global subtract
213
subtract:
214
        R5 = R3 - R0;
215
        R7 = R7 - r0 (S);
216
        r3 = r2 - r1 (ns);
217
 
218
        r5.l = R6.H - R7.h (s);
219
        r0.H = r3.l - r3.h (NS);
220
 
221
        .text
222
        .global subtract_immediate
223
subtract_immediate:
224
        I2 -= 2;
225
        i0 -= 4;
226
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.