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

Unified Diff: fusl/src/math/i386/remquo.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/math/i386/remainderl.s ('k') | fusl/src/math/i386/remquof.s » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/math/i386/remquo.s
diff --git a/fusl/src/math/i386/remquo.s b/fusl/src/math/i386/remquo.s
new file mode 100644
index 0000000000000000000000000000000000000000..598e75490ff0af45e4cbd627b0cba218ba26cb37
--- /dev/null
+++ b/fusl/src/math/i386/remquo.s
@@ -0,0 +1,50 @@
+.global remquof
+.type remquof,@function
+remquof:
+ mov 12(%esp),%ecx
+ flds 8(%esp)
+ flds 4(%esp)
+ mov 11(%esp),%dh
+ xor 7(%esp),%dh
+ jmp 1f
+
+.global remquol
+.type remquol,@function
+remquol:
+ mov 28(%esp),%ecx
+ fldt 16(%esp)
+ fldt 4(%esp)
+ mov 25(%esp),%dh
+ xor 13(%esp),%dh
+ jmp 1f
+
+.global remquo
+.type remquo,@function
+remquo:
+ mov 20(%esp),%ecx
+ fldl 12(%esp)
+ fldl 4(%esp)
+ mov 19(%esp),%dh
+ xor 11(%esp),%dh
+1: fprem1
+ fnstsw %ax
+ sahf
+ jp 1b
+ fstp %st(1)
+ mov %ah,%dl
+ shr %dl
+ and $1,%dl
+ mov %ah,%al
+ shr $5,%al
+ and $2,%al
+ or %al,%dl
+ mov %ah,%al
+ shl $2,%al
+ and $4,%al
+ or %al,%dl
+ test %dh,%dh
+ jns 1f
+ neg %dl
+1: movsbl %dl,%edx
+ mov %edx,(%ecx)
+ ret
« no previous file with comments | « fusl/src/math/i386/remainderl.s ('k') | fusl/src/math/i386/remquof.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698