fenv.S raw

   1  #ifndef __mips_soft_float
   2  
   3  .set noreorder
   4  
   5  .global feclearexcept
   6  .type  feclearexcept,@function
   7  feclearexcept:
   8  	and     $4, $4, 0x7c
   9  	cfc1    $5, $31
  10  	or      $5, $5, $4
  11  	xor     $5, $5, $4
  12  	ctc1    $5, $31
  13  	jr      $ra
  14  	li      $2, 0
  15  
  16  .global feraiseexcept
  17  .type  feraiseexcept,@function
  18  feraiseexcept:
  19  	and     $4, $4, 0x7c
  20  	cfc1    $5, $31
  21  	or      $5, $5, $4
  22  	ctc1    $5, $31
  23  	jr      $ra
  24  	li      $2, 0
  25  
  26  .global fetestexcept
  27  .type  fetestexcept,@function
  28  fetestexcept:
  29  	and     $4, $4, 0x7c
  30  	cfc1    $2, $31
  31  	jr      $ra
  32  	and     $2, $2, $4
  33  
  34  .global fegetround
  35  .type  fegetround,@function
  36  fegetround:
  37  	cfc1    $2, $31
  38  	jr      $ra
  39  	andi    $2, $2, 3
  40  
  41  .global __fesetround
  42  .hidden __fesetround
  43  .type __fesetround,@function
  44  __fesetround:
  45  	cfc1    $5, $31
  46  	li      $6, -4
  47  	and     $5, $5, $6
  48  	or      $5, $5, $4
  49  	ctc1    $5, $31
  50  	jr      $ra
  51  	li      $2, 0
  52  
  53  .global fegetenv
  54  .type  fegetenv,@function
  55  fegetenv:
  56  	cfc1    $5, $31
  57  	sw      $5, 0($4)
  58  	jr      $ra
  59  	li      $2, 0
  60  
  61  .global fesetenv
  62  .type  fesetenv,@function
  63  fesetenv:
  64  	addiu   $5, $4, 1
  65  	beq     $5, $0, 1f
  66  	 nop
  67  	lw      $5, 0($4)
  68  1:	ctc1    $5, $31
  69  	jr      $ra
  70  	li      $2, 0
  71  
  72  #endif
  73