[Git][ghc/ghc][wip/js-staging] Add encodeDouble/Float RTS functions

Sylvain Henry (@hsyl20) gitlab at gitlab.haskell.org
Thu Sep 22 12:56:24 UTC 2022



Sylvain Henry pushed to branch wip/js-staging at Glasgow Haskell Compiler / GHC


Commits:
390df0aa by Sylvain Henry at 2022-09-22T14:59:13+02:00
Add encodeDouble/Float RTS functions

- - - - -


1 changed file:

- rts/js/arith.js


Changes:

=====================================
rts/js/arith.js
=====================================
@@ -613,3 +613,19 @@ function h$decodeDoubleInt64(d) {
   // prim ubx tup returns don't return the first value!
   RETURN_UBX_TUP3(ret3,ret1,ret2);
 }
+
+function h$__int_encodeDouble(j,e) {
+  return (j|0) ** (e|0);
+}
+
+function h$__word_encodeDouble(j,e) {
+  return (j>>>0) ** (e|0);
+}
+
+function h$__int_encodeFloat(j,e) {
+  return h$fround((j|0) ** (e|0));
+}
+
+function h$__word_encodeFloat(j,e) {
+  return h$fround((j>>>0) ** (e|0));
+}



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/390df0aa9e0995c4f68154323e4e94c340781d6e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/390df0aa9e0995c4f68154323e4e94c340781d6e
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220922/b034d03a/attachment-0001.html>


More information about the ghc-commits mailing list