1: /*
   2:  * Copyright (c) 1985 Regents of the University of California.
   3:  *
   4:  * Use and reproduction of this software are granted  in  accordance  with
   5:  * the terms and conditions specified in  the  Berkeley  Software  License
   6:  * Agreement (in particular, this entails acknowledgement of the programs'
   7:  * source, and inclusion of this notice) with the additional understanding
   8:  * that  all  recipients  should regard themselves as participants  in  an
   9:  * ongoing  research  project and hence should  feel  obligated  to report
  10:  * their  experiences (good or bad) with these elementary function  codes,
  11:  * using "sendbug 4bsd-bugs@BERKELEY", to the authors.
  12:  *
  13:  * @(#)infnan.s	1.1 (Berkeley) 8/21/85
  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:  */
  23:         .globl  _infnan
  24:         .set    EDOM,33
  25:         .set    ERANGE,34
  26:         .text
  27:         .align 1
  28: _infnan:
  29:         .word   0x0
  30:         cmpl    4(ap),$ERANGE
  31:         bneq    1f
  32:         movl    $ERANGE,_errno
  33:         brb     2f
  34: 1:      movl    $EDOM,_errno
  35: 2:      emodd   $0,$0,$0x8000,r0,r0     # generates the reserved operand fault
  36:         ret
Last modified: 1985-08-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1045
Valid CSS Valid XHTML 1.0 Strict