xref: /minix3/lib/libc/arch/m68k/hardfloat/nesf2.S (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc/*	$NetBSD: nesf2.S,v 1.2 2014/03/18 18:20:37 riastradh Exp $	*/
284d9c625SLionel Sambuc
384d9c625SLionel Sambuc/*-
484d9c625SLionel Sambuc * Copyright (c) 1990 The Regents of the University of California.
584d9c625SLionel Sambuc * All rights reserved.
684d9c625SLionel Sambuc *
784d9c625SLionel Sambuc * This code is derived from software contributed to Berkeley by
884d9c625SLionel Sambuc * the Systems Programming Group of the University of Utah Computer
984d9c625SLionel Sambuc * Science Department.
1084d9c625SLionel Sambuc *
1184d9c625SLionel Sambuc * Redistribution and use in source and binary forms, with or without
1284d9c625SLionel Sambuc * modification, are permitted provided that the following conditions
1384d9c625SLionel Sambuc * are met:
1484d9c625SLionel Sambuc * 1. Redistributions of source code must retain the above copyright
1584d9c625SLionel Sambuc *    notice, this list of conditions and the following disclaimer.
1684d9c625SLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright
1784d9c625SLionel Sambuc *    notice, this list of conditions and the following disclaimer in the
1884d9c625SLionel Sambuc *    documentation and/or other materials provided with the distribution.
1984d9c625SLionel Sambuc * 3. Neither the name of the University nor the names of its contributors
2084d9c625SLionel Sambuc *    may be used to endorse or promote products derived from this software
2184d9c625SLionel Sambuc *    without specific prior written permission.
2284d9c625SLionel Sambuc *
2384d9c625SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2484d9c625SLionel Sambuc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2584d9c625SLionel Sambuc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2684d9c625SLionel Sambuc * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2784d9c625SLionel Sambuc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2884d9c625SLionel Sambuc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2984d9c625SLionel Sambuc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3084d9c625SLionel Sambuc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3184d9c625SLionel Sambuc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3284d9c625SLionel Sambuc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3384d9c625SLionel Sambuc * SUCH DAMAGE.
3484d9c625SLionel Sambuc */
3584d9c625SLionel Sambuc
3684d9c625SLionel Sambuc#include <machine/asm.h>
3784d9c625SLionel Sambuc
3884d9c625SLionel Sambuc#if defined(LIBC_SCCS) && !defined(lint)
39*0a6a1f1dSLionel SambucRCSID("$NetBSD: nesf2.S,v 1.2 2014/03/18 18:20:37 riastradh Exp $")
4084d9c625SLionel Sambuc#endif /* LIBC_SCCS and not lint */
4184d9c625SLionel Sambuc
4284d9c625SLionel SambucSTRONG_ALIAS(__eqsf2,__nesf2)
4384d9c625SLionel Sambuc
4484d9c625SLionel Sambuc/* single != single: 1 */
4584d9c625SLionel Sambuc/* single == single: 0 */
4684d9c625SLionel SambucENTRY(__nesf2)
4784d9c625SLionel Sambuc	fmoves	4(%sp),%fp0
4884d9c625SLionel Sambuc	fcmps	8(%sp),%fp0
4984d9c625SLionel Sambuc	fbeq	Lbeq
5084d9c625SLionel Sambuc	movql	#1,%d0
5184d9c625SLionel Sambuc	rts
5284d9c625SLionel SambucLbeq:
5384d9c625SLionel Sambuc	clrl	%d0
5484d9c625SLionel Sambuc	rts
5584d9c625SLionel SambucEND(__nesf2)
56