|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1986 Regents of the University of California. ! 3: * All rights reserved. ! 4: * ! 5: * This code is derived from software contributed to Berkeley by ! 6: * Computer Consoles Inc. ! 7: * ! 8: * Redistribution and use in source and binary forms are permitted ! 9: * provided that: (1) source distributions retain this entire copyright ! 10: * notice and comment, and (2) distributions including binaries display ! 11: * the following acknowledgement: ``This product includes software ! 12: * developed by the University of California, Berkeley and its contributors'' ! 13: * in the documentation or other materials provided with the distribution ! 14: * and in all advertising materials mentioning features or use of this ! 15: * software. Neither the name of the University nor the names of its ! 16: * contributors may be used to endorse or promote products derived ! 17: * from this software without specific prior written permission. ! 18: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 19: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 20: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 21: */ ! 22: ! 23: #if defined(SYSLIBC_SCCS) && !defined(lint) ! 24: .asciz "@(#)cmpf.s 1.3 (Berkeley) 6/1/90" ! 25: #endif /* SYSLIBC_SCCS and not lint */ ! 26: ! 27: /* ! 28: * cmpf(f1, f2) ! 29: * float f1, f2; ! 30: * return -1, 0, 1 as f1 <, ==, > f2 ! 31: */ ! 32: #include "DEFS.h" ! 33: ! 34: XENTRY(cmpf, 0) ! 35: cmpl 4(fp),12(fp) ! 36: jneq 1f ! 37: clrl r0 ! 38: ret ! 39: 1: ! 40: movl 4(fp),r0 ! 41: jgeq 1f ! 42: xorl2 $0x80000000,r0 ! 43: mnegl r0,r0 ! 44: 1: ! 45: movl 12(fp),r1 ! 46: jgeq 1f ! 47: xorl2 $0x80000000,r1 ! 48: mnegl r1,r1 ! 49: 1: ! 50: cmpl r0,r1 ! 51: jleq 1f ! 52: movl $1,r0 ! 53: ret ! 54: 1: ! 55: mnegl $1,r0 ! 56: ret
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.