Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: fusl/src/fenv/mips/fenv.s

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/src/fenv/mips-sf/fenv.sub ('k') | fusl/src/fenv/mipsel-sf/fenv.sub » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/fenv/mips/fenv.s
diff --git a/fusl/src/fenv/mips/fenv.s b/fusl/src/fenv/mips/fenv.s
new file mode 100644
index 0000000000000000000000000000000000000000..62828212ab965fba35e6cd205d001b5103245a26
--- /dev/null
+++ b/fusl/src/fenv/mips/fenv.s
@@ -0,0 +1,67 @@
+.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
« no previous file with comments | « fusl/src/fenv/mips-sf/fenv.sub ('k') | fusl/src/fenv/mipsel-sf/fenv.sub » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698