1/*- 2 * Copyright (c) 1985 The 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 * %sccs.include.redist.c% 9 * 10 * @(#)Kcmpf.s 7.1 (Berkeley) 12/06/90 11 */ 12 13#include "../tahoe/SYS.h" 14 15/* 16 * cmpf(o1, o2) 17 * register o1, o2; 18 *{ 19 * if(o1 < 0) { 20 * o1 ^= 0x80000000; 21 * o1 = -o1; 22 * } 23 * if(o2 < 0) { 24 * o2 ^= 0x80000000; 25 * o2 = -o2; 26 * } 27 * if(o1 != o2) 28 * return(o1>o2 ? 1 : -1); 29 * return(0); 30 *} 31 */ 32 .text 33ENTRY(Kcmpf, 0) 34 movl 4(fp),r12 35 jgeq 1f 36 xorl2 $0x80000000,r12 37 mnegl r12,r12 381: 39 movl 12(fp),r11 40 jgeq 1f 41 xorl2 $0x80000000,r11 42 mnegl r11,r11 431: 44 cmpl r12,r11 45 jneq 1f 46 clr r0; ret 471: 48 jleq 1f 49 movl $1,r0; ret 501: 51 mnegl $1,r0; ret 52