fenv.S raw

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