136829Sbostic/* 2*61181Sbostic * Copyright (c) 1986, 1993 3*61181Sbostic * The Regents of the University of California. All rights reserved. 436829Sbostic * 536829Sbostic * This code is derived from software contributed to Berkeley by 636829Sbostic * Computer Consoles Inc. 736829Sbostic * 842637Sbostic * %sccs.include.redist.c% 936829Sbostic */ 1029509Ssam 1136829Sbostic#if defined(SYSLIBC_SCCS) && !defined(lint) 12*61181Sbostic .asciz "@(#)cmpf.s 8.1 (Berkeley) 06/04/93" 1336829Sbostic#endif /* SYSLIBC_SCCS and not lint */ 1436829Sbostic 1529509Ssam/* 1629509Ssam * cmpf(f1, f2) 1729509Ssam * float f1, f2; 1829509Ssam * return -1, 0, 1 as f1 <, ==, > f2 1929509Ssam */ 2029509Ssam#include "DEFS.h" 2129509Ssam 2229509SsamXENTRY(cmpf, 0) 2329509Ssam cmpl 4(fp),12(fp) 2429509Ssam jneq 1f 2529509Ssam clrl r0 2629509Ssam ret 2729509Ssam1: 2829509Ssam movl 4(fp),r0 2929509Ssam jgeq 1f 3029509Ssam xorl2 $0x80000000,r0 3129509Ssam mnegl r0,r0 3229509Ssam1: 3329509Ssam movl 12(fp),r1 3429509Ssam jgeq 1f 3529509Ssam xorl2 $0x80000000,r1 3629509Ssam mnegl r1,r1 3729509Ssam1: 3829509Ssam cmpl r0,r1 3929509Ssam jleq 1f 4029509Ssam movl $1,r0 4129509Ssam ret 4229509Ssam1: 4329509Ssam mnegl $1,r0 4429509Ssam ret 45