134125Sbostic/* 2*61319Sbostic * Copyright (c) 1985, 1993 3*61319Sbostic * The Regents of the University of California. All rights reserved. 434125Sbostic * 542658Sbostic * %sccs.include.redist.c% 634125Sbostic * 7*61319Sbostic * @(#)infnan.s 8.1 (Berkeley) 06/04/93 824729Selefunt */ 924729Selefunt .data 1024729Selefunt .align 2 1124729Selefunt_sccsid: 12*61319Sbostic.asciz "@(#)infnan.s 1.1 (Berkeley) 8/21/85; 8.1 (ucb.elefunt) 06/04/93" 1324729Selefunt 1424729Selefunt/* 1524569Szliu * infnan(arg) int arg; 1624569Szliu * where arg := EDOM if result is NaN 1724569Szliu * := ERANGE if result is +INF 1824569Szliu * := -ERANGE if result is -INF 1924569Szliu * 2024569Szliu * The Reserved Operand Fault is generated inside of this routine. 2124569Szliu */ 2224569Szliu .globl _infnan 2324569Szliu .set EDOM,33 2424569Szliu .set ERANGE,34 2524569Szliu .text 2624569Szliu .align 1 2724569Szliu_infnan: 2824569Szliu .word 0x0 2924569Szliu cmpl 4(ap),$ERANGE 3024569Szliu bneq 1f 3124569Szliu movl $ERANGE,_errno 3224569Szliu brb 2f 3324569Szliu1: movl $EDOM,_errno 3424569Szliu2: emodd $0,$0,$0x8000,r0,r0 # generates the reserved operand fault 3524569Szliu ret 36