2 Copyright
(C
) 2000 Free Software Foundation
, Inc.
3 Contributed by Red Hat
, Inc.
5 This file is part of GNU CC.
7 GNU CC is free software
; you can redistribute it and/or modify
8 it under the terms of the GNU General
Public License as published by
9 the Free Software Foundation
* either version
2, or (at your option
)
12 GNU CC is distributed
in the hope that it will be useful
,
13 but WITHOUT ANY WARRANTY
; without even the implied warranty of
14 MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General
Public License for more details.
17 You should have received a copy of the GNU General
Public License
18 along with GNU CC
; see the file COPYING. If not, write to
19 the Free Software Foundation
, 59 Temple Place
- Suite
330,
20 Boston
, MA
02111-1307, USA.
*/
26 /* icc0
= __cmpll
(long long a
, long long b
) */
30 .
type EXT
(__cmpll
),@function
36 P
(ccmp
) gr9
, gr11
, cc4
, 1
39 .
size EXT
(__cmpll
),.Lend
-EXT
(__cmpll
)
43 /* icc0
= __cmpf
(float a
, float b
) */
44 /* Note
, because
this function returns the result
in ICC0
, it means it can
't
49 .type EXT(__cmpf),@function
53 #ifdef __FRV_HARD_FLOAT__ /* floating point instructions available */
60 csub gr0, gr8, gr8, cc0, 1
64 #else /* no floating point instructions available */
79 .size EXT(__cmpf),.Lend-EXT(__cmpf)
83 /* icc0 = __cmpd (double a, double b) */
84 /* Note, because this function returns the result in ICC0, it means it can't
89 .
type EXT
(__cmpd
),@function
106 .
size EXT
(__cmpd
),.Lend
-EXT
(__cmpd
)
110 /* gr8
,gr9
= __addll
(long long a
, long long b
) */
111 /* Note
, gcc will never
call this function
, but it is present
in case an
112 ABI program calls it.
*/
116 .
type EXT
(__addll
),@function
120 addcc gr9
, gr11
, gr9
, icc0
121 addx gr8
, gr10
, gr8
, icc0
124 .
size EXT
(__addll
),.Lend
-EXT
(__addll
)
128 /* gr8
,gr9
= __subll
(long long a
, long long b
) */
129 /* Note
, gcc will never
call this function
, but it is present
in case an
130 ABI program calls it.
*/
134 .
type EXT
(__subll
),@function
138 subcc gr9
, gr11
, gr9
, icc0
139 subx gr8
, gr10
, gr8
, icc0
142 .
size EXT
(__subll
),.Lend
-EXT
(__subll
)
146 /* gr8
,gr9
= __andll
(long long a
, long long b
) */
147 /* Note
, gcc will never
call this function
, but it is present
in case an
148 ABI program calls it.
*/
152 .
type EXT
(__andll
),@function
156 P
(and) gr9
, gr11
, gr9
157 P2
(and) gr8
, gr10
, gr8
160 .
size EXT
(__andll
),.Lend
-EXT
(__andll
)
164 /* gr8
,gr9
= __orll
(long long a
, long long b
) */
165 /* Note
, gcc will never
call this function
, but it is present
in case an
166 ABI program calls it.
*/
170 .
type EXT
(__orll
),@function
175 P2
(or) gr8
, gr10
, gr8
178 .
size EXT
(__orll
),.Lend
-EXT
(__orll
)
182 /* gr8
,gr9
= __xorll
(long long a
, long long b
) */
183 /* Note
, gcc will never
call this function
, but it is present
in case an
184 ABI program calls it.
*/
188 .
type EXT
(__xorll
),@function
192 P
(xor) gr9
, gr11
, gr9
193 P2
(xor) gr8
, gr10
, gr8
196 .
size EXT
(__xorll
),.Lend
-EXT
(__xorll
)
200 /* gr8
,gr9
= __notll
(long long a
) */
201 /* Note
, gcc will never
call this function
, but it is present
in case an
202 ABI program calls it.
*/
206 .
type EXT
(__notll
),@function
214 .
size EXT
(__notll
),.Lend
-EXT
(__notll
)
218 /* (void
) __cmov
(char
*dest
, const char
*src
, size_t len
) */
220 * void __cmov
(char
*dest
, const char
*src
, size_t len
)
224 * if (dest < src || dest > src+len)
226 * for (i = 0; i < len; i++)
232 * dest[len] = src[len];
239 .
type EXT
(__cmov
),@function
243 P
(cmp) gr8
, gr9
, icc0
245 P
(cmp) gr8
, gr4
, icc1
249 /* move bytes
in a forward direction
*/
253 P2
(subi
) gr8
, #
1, gr8
256 /* forward
byte move
loop */
258 P
(ldsb
) @
(gr9
, gr5
), gr4
260 P
(stb
) gr4
, @
(gr8
, gr5
)
264 /* backward
byte move
loop body
*/
268 P
(cmpi
) gr10
, #
0, icc0
274 .
size EXT
(__cmov
),.Lend
-EXT
(__cmov
)