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

Unified Diff: fusl/src/math/i386/scalbn.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/scalblnl.s ('k') | fusl/src/math/i386/scalbnf.s » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/math/i386/scalbn.s
diff --git a/fusl/src/math/i386/scalbn.s b/fusl/src/math/i386/scalbn.s
new file mode 100644
index 0000000000000000000000000000000000000000..8bf302f236bb09e829188e5f9ca344b39b73a694
--- /dev/null
+++ b/fusl/src/math/i386/scalbn.s
@@ -0,0 +1,33 @@
+.global ldexp
+.type ldexp,@function
+ldexp:
+ nop
+
+.global scalbln
+.type scalbln,@function
+scalbln:
+ nop
+
+.global scalbn
+.type scalbn,@function
+scalbn:
+ mov 12(%esp),%eax
+ add $0x3ffe,%eax
+ cmp $0x7ffd,%eax
+ jb 1f
+ sub $0x3ffe,%eax
+ sar $31,%eax
+ xor $0xfff,%eax
+ add $0x3ffe,%eax
+1: inc %eax
+ fldl 4(%esp)
+ mov %eax,12(%esp)
+ mov $0x80000000,%eax
+ mov %eax,8(%esp)
+ xor %eax,%eax
+ mov %eax,4(%esp)
+ fldt 4(%esp)
+ fmulp
+ fstpl 4(%esp)
+ fldl 4(%esp)
+ ret
« no previous file with comments | « fusl/src/math/i386/scalblnl.s ('k') | fusl/src/math/i386/scalbnf.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698