Annotation of 43BSDReno/lib/libm/vax/infnan.s, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1985 Regents of the University of California.
        !             3:  * All rights reserved.
        !             4:  *
        !             5:  * Redistribution and use in source and binary forms are permitted
        !             6:  * provided that: (1) source distributions retain this entire copyright
        !             7:  * notice and comment, and (2) distributions including binaries display
        !             8:  * the following acknowledgement:  ``This product includes software
        !             9:  * developed by the University of California, Berkeley and its contributors''
        !            10:  * in the documentation or other materials provided with the distribution
        !            11:  * and in all advertising materials mentioning features or use of this
        !            12:  * software. Neither the name of the University nor the names of its
        !            13:  * contributors may be used to endorse or promote products derived
        !            14:  * from this software without specific prior written permission.
        !            15:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
        !            16:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
        !            17:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            18:  *
        !            19:  * All recipients should regard themselves as participants in an ongoing
        !            20:  * research project and hence should feel obligated to report their
        !            21:  * experiences (good or bad) with these elementary function codes, using
        !            22:  * the sendbug(8) program, to the authors.
        !            23:  *
        !            24:  *     @(#)infnan.s    5.4 (Berkeley) 6/1/90
        !            25:  */
        !            26:        .data
        !            27:        .align  2
        !            28: _sccsid:
        !            29: .asciz "@(#)infnan.s   1.1 (Berkeley) 8/21/85; 5.4 (ucb.elefunt) 6/1/90"
        !            30: 
        !            31: /*
        !            32:  * infnan(arg) int arg;
        !            33:  * where arg :=    EDOM        if result is  NaN
        !            34:  *          :=  ERANGE if result is +INF
        !            35:  *          := -ERANGE if result is -INF
        !            36:  *
        !            37:  * The Reserved Operand Fault is generated inside of this routine.
        !            38:  */    
        !            39:        .globl  _infnan
        !            40:        .set    EDOM,33
        !            41:        .set    ERANGE,34
        !            42:        .text
        !            43:        .align 1
        !            44: _infnan:
        !            45:        .word   0x0
        !            46:        cmpl    4(ap),$ERANGE
        !            47:        bneq    1f
        !            48:        movl    $ERANGE,_errno
        !            49:        brb     2f
        !            50: 1:     movl    $EDOM,_errno
        !            51: 2:     emodd   $0,$0,$0x8000,r0,r0     # generates the reserved operand fault
        !            52:        ret

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.