134125Sbostic/* 224569Szliu * Copyright (c) 1985 Regents of the University of California. 334125Sbostic * All rights reserved. 434125Sbostic * 5*42658Sbostic * %sccs.include.redist.c% 634125Sbostic * 734125Sbostic * All recipients should regard themselves as participants in an ongoing 834125Sbostic * research project and hence should feel obligated to report their 934125Sbostic * experiences (good or bad) with these elementary function codes, using 1034125Sbostic * the sendbug(8) program, to the authors. 1134125Sbostic * 12*42658Sbostic * @(#)infnan.s 5.4 (Berkeley) 06/01/90 1324729Selefunt */ 1424729Selefunt .data 1524729Selefunt .align 2 1624729Selefunt_sccsid: 17*42658Sbostic.asciz "@(#)infnan.s 1.1 (Berkeley) 8/21/85; 5.4 (ucb.elefunt) 06/01/90" 1824729Selefunt 1924729Selefunt/* 2024569Szliu * infnan(arg) int arg; 2124569Szliu * where arg := EDOM if result is NaN 2224569Szliu * := ERANGE if result is +INF 2324569Szliu * := -ERANGE if result is -INF 2424569Szliu * 2524569Szliu * The Reserved Operand Fault is generated inside of this routine. 2624569Szliu */ 2724569Szliu .globl _infnan 2824569Szliu .set EDOM,33 2924569Szliu .set ERANGE,34 3024569Szliu .text 3124569Szliu .align 1 3224569Szliu_infnan: 3324569Szliu .word 0x0 3424569Szliu cmpl 4(ap),$ERANGE 3524569Szliu bneq 1f 3624569Szliu movl $ERANGE,_errno 3724569Szliu brb 2f 3824569Szliu1: movl $EDOM,_errno 3924569Szliu2: emodd $0,$0,$0x8000,r0,r0 # generates the reserved operand fault 4024569Szliu ret 41