1*45761Sbostic/*- 2*45761Sbostic * Copyright (c) 1985 The Regents of the University of California. 3*45761Sbostic * All rights reserved. 4*45761Sbostic * 5*45761Sbostic * This code is derived from software contributed to Berkeley by 6*45761Sbostic * Computer Consoles Inc. 7*45761Sbostic * 8*45761Sbostic * %sccs.include.redist.c% 9*45761Sbostic * 10*45761Sbostic * @(#)Kcmpf.s 7.1 (Berkeley) 12/06/90 11*45761Sbostic */ 1224136Ssam 1325693Ssam#include "../tahoe/SYS.h" 1424136Ssam 1525664Ssam/* 1625664Ssam * cmpf(o1, o2) 1725664Ssam * register o1, o2; 1825664Ssam *{ 1925664Ssam * if(o1 < 0) { 2025664Ssam * o1 ^= 0x80000000; 2125664Ssam * o1 = -o1; 2225664Ssam * } 2325664Ssam * if(o2 < 0) { 2425664Ssam * o2 ^= 0x80000000; 2525664Ssam * o2 = -o2; 2625664Ssam * } 2725664Ssam * if(o1 != o2) 2825664Ssam * return(o1>o2 ? 1 : -1); 2925664Ssam * return(0); 3025664Ssam *} 3125664Ssam */ 3225664Ssam .text 3325664SsamENTRY(Kcmpf, 0) 3425664Ssam movl 4(fp),r12 3525664Ssam jgeq 1f 3625664Ssam xorl2 $0x80000000,r12 3725664Ssam mnegl r12,r12 3825664Ssam1: 3925664Ssam movl 12(fp),r11 4025664Ssam jgeq 1f 4125664Ssam xorl2 $0x80000000,r11 4225664Ssam mnegl r11,r11 4325664Ssam1: 4425664Ssam cmpl r12,r11 4525664Ssam jneq 1f 4625664Ssam clr r0; ret 4725664Ssam1: 4825664Ssam jleq 1f 4925664Ssam movl $1,r0; ret 5025664Ssam1: 5125664Ssam mnegl $1,r0; ret 52