Home | History | Annotate | Line # | Download | only in hardfloat
cmpdf2.S revision 1.3.4.2
      1  1.3.4.2  yamt /*	$NetBSD: cmpdf2.S,v 1.3.4.2 2014/05/22 11:36:47 yamt Exp $	*/
      2  1.3.4.2  yamt 
      3  1.3.4.2  yamt /*-
      4  1.3.4.2  yamt  * Copyright (c) 1990 The Regents of the University of California.
      5  1.3.4.2  yamt  * All rights reserved.
      6  1.3.4.2  yamt  *
      7  1.3.4.2  yamt  * This code is derived from software contributed to Berkeley by
      8  1.3.4.2  yamt  * the Systems Programming Group of the University of Utah Computer
      9  1.3.4.2  yamt  * Science Department.
     10  1.3.4.2  yamt  *
     11  1.3.4.2  yamt  * Redistribution and use in source and binary forms, with or without
     12  1.3.4.2  yamt  * modification, are permitted provided that the following conditions
     13  1.3.4.2  yamt  * are met:
     14  1.3.4.2  yamt  * 1. Redistributions of source code must retain the above copyright
     15  1.3.4.2  yamt  *    notice, this list of conditions and the following disclaimer.
     16  1.3.4.2  yamt  * 2. Redistributions in binary form must reproduce the above copyright
     17  1.3.4.2  yamt  *    notice, this list of conditions and the following disclaimer in the
     18  1.3.4.2  yamt  *    documentation and/or other materials provided with the distribution.
     19  1.3.4.2  yamt  * 3. Neither the name of the University nor the names of its contributors
     20  1.3.4.2  yamt  *    may be used to endorse or promote products derived from this software
     21  1.3.4.2  yamt  *    without specific prior written permission.
     22  1.3.4.2  yamt  *
     23  1.3.4.2  yamt  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24  1.3.4.2  yamt  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  1.3.4.2  yamt  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  1.3.4.2  yamt  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27  1.3.4.2  yamt  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28  1.3.4.2  yamt  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29  1.3.4.2  yamt  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  1.3.4.2  yamt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  1.3.4.2  yamt  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  1.3.4.2  yamt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  1.3.4.2  yamt  * SUCH DAMAGE.
     34  1.3.4.2  yamt  */
     35  1.3.4.2  yamt 
     36  1.3.4.2  yamt #include <machine/asm.h>
     37  1.3.4.2  yamt 
     38  1.3.4.2  yamt #if defined(LIBC_SCCS) && !defined(lint)
     39  1.3.4.2  yamt #if 0
     40  1.3.4.2  yamt 	RCSID("from: @(#)cmpdf2.s	5.1 (Berkeley) 6/7/90")
     41  1.3.4.2  yamt #else
     42  1.3.4.2  yamt 	RCSID("$NetBSD: cmpdf2.S,v 1.3.4.2 2014/05/22 11:36:47 yamt Exp $")
     43  1.3.4.2  yamt #endif
     44  1.3.4.2  yamt #endif /* LIBC_SCCS and not lint */
     45  1.3.4.2  yamt 
     46  1.3.4.2  yamt /* double > double: 1 */
     47  1.3.4.2  yamt /* double < double: -1 */
     48  1.3.4.2  yamt /* double == double: 0 */
     49  1.3.4.2  yamt ENTRY(__cmpdf2)
     50  1.3.4.2  yamt 	fmoved	4(%sp),%fp0
     51  1.3.4.2  yamt 	fcmpd	12(%sp),%fp0
     52  1.3.4.2  yamt 	fbgt	Lbgt
     53  1.3.4.2  yamt #ifdef __mcoldfire__
     54  1.3.4.2  yamt 	fbeq	Lbeq
     55  1.3.4.2  yamt 	movql	#-1,%d0
     56  1.3.4.2  yamt #else
     57  1.3.4.2  yamt 	fslt	%d0
     58  1.3.4.2  yamt 	extbl	%d0
     59  1.3.4.2  yamt #endif
     60  1.3.4.2  yamt 	rts
     61  1.3.4.2  yamt Lbgt:
     62  1.3.4.2  yamt 	moveq	#1,%d0
     63  1.3.4.2  yamt 	rts
     64  1.3.4.2  yamt #ifdef __mcoldfire__
     65  1.3.4.2  yamt Lbeq:
     66  1.3.4.2  yamt 	clrl	%d0
     67  1.3.4.2  yamt 	rts
     68  1.3.4.2  yamt #endif
     69  1.3.4.2  yamt END(__cmpdf2)
     70