1/* 2 * Copyright (c) 1985, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)infnan.s 8.1 (Berkeley) 06/04/93 8 */ 9 .data 10 .align 2 11_sccsid: 12.asciz "@(#)infnan.s 1.1 (Berkeley) 8/21/85; 8.1 (ucb.elefunt) 06/04/93" 13 14/* 15 * infnan(arg) int arg; 16 * where arg := EDOM if result is NaN 17 * := ERANGE if result is +INF 18 * := -ERANGE if result is -INF 19 * 20 * The Reserved Operand Fault is generated inside of this routine. 21 */ 22 .globl _infnan 23 .set EDOM,33 24 .set ERANGE,34 25 .text 26 .align 1 27_infnan: 28 .word 0x0 29 cmpl 4(ap),$ERANGE 30 bneq 1f 31 movl $ERANGE,_errno 32 brb 2f 331: movl $EDOM,_errno 342: emodd $0,$0,$0x8000,r0,r0 # generates the reserved operand fault 35 ret 36