diff options
author | Rich Felker <dalias@aerifal.cx> | 2016-01-20 02:07:59 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2016-01-20 02:07:59 +0000 |
commit | af21a82ccc8687aa16e85def7db95efeae4cf72e (patch) | |
tree | 6b34bd5b507fe4076ce3c3f4556cad3d860a2a95 /src/fenv/mips/fenv.S | |
parent | 4b9a08f29303661e9680fc1ee1569daa25df7d50 (diff) | |
download | musl-af21a82ccc8687aa16e85def7db95efeae4cf72e.tar.gz musl-af21a82ccc8687aa16e85def7db95efeae4cf72e.tar.bz2 musl-af21a82ccc8687aa16e85def7db95efeae4cf72e.tar.xz musl-af21a82ccc8687aa16e85def7db95efeae4cf72e.zip |
switch arm, sh, and mips fenv asm from .sub system to .S files
Diffstat (limited to 'src/fenv/mips/fenv.S')
-rw-r--r-- | src/fenv/mips/fenv.S | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/fenv/mips/fenv.S b/src/fenv/mips/fenv.S new file mode 100644 index 00000000..a5cb1f58 --- /dev/null +++ b/src/fenv/mips/fenv.S @@ -0,0 +1,71 @@ +#ifndef __mips_soft_float + +.set noreorder + +.global feclearexcept +.type feclearexcept,@function +feclearexcept: + and $4, $4, 0x7c + cfc1 $5, $31 + or $5, $5, $4 + xor $5, $5, $4 + ctc1 $5, $31 + jr $ra + li $2, 0 + +.global feraiseexcept +.type feraiseexcept,@function +feraiseexcept: + and $4, $4, 0x7c + cfc1 $5, $31 + or $5, $5, $4 + ctc1 $5, $31 + jr $ra + li $2, 0 + +.global fetestexcept +.type fetestexcept,@function +fetestexcept: + and $4, $4, 0x7c + cfc1 $2, $31 + jr $ra + and $2, $2, $4 + +.global fegetround +.type fegetround,@function +fegetround: + cfc1 $2, $31 + jr $ra + andi $2, $2, 3 + +.global __fesetround +.type __fesetround,@function +__fesetround: + cfc1 $5, $31 + li $6, -4 + and $5, $5, $6 + or $5, $5, $4 + ctc1 $5, $31 + jr $ra + li $2, 0 + +.global fegetenv +.type fegetenv,@function +fegetenv: + cfc1 $5, $31 + sw $5, 0($4) + jr $ra + li $2, 0 + +.global fesetenv +.type fesetenv,@function +fesetenv: + addiu $5, $4, 1 + beq $5, $0, 1f + nop + lw $5, 0($4) +1: ctc1 $5, $31 + jr $ra + li $2, 0 + +#endif |