summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-10-31 00:16:33 -0700
committerOri Bernstein <ori@eigenstate.org>2016-10-31 00:16:33 -0700
commit3dfc4831756350a569d234e3a0b1de7b90bc5705 (patch)
tree762bd45a96d756b85012d7206cc06006fd937d54
parent24cdade7c68fb72245f0aa2fecde4e21306b6549 (diff)
downloadmc-3dfc4831756350a569d234e3a0b1de7b90bc5705.tar.gz
Fix float assembly masks.
-rw-r--r--lib/std/fltbits.myr4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/fltbits.myr b/lib/std/fltbits.myr
index 989396e..935acbb 100644
--- a/lib/std/fltbits.myr
+++ b/lib/std/fltbits.myr
@@ -69,7 +69,7 @@ const flt64assem = {sign, mant, exp
var s, m, e
s = (sign : uint64)
- e = (exp : uint64) & 0x3ff
+ e = (exp : uint64) & 0x7ff
m = (mant : uint64) & ((1ul<<52) - 1)
-> std.flt64frombits((s << 63) | (e << 52) | m)
}
@@ -78,7 +78,7 @@ const flt32assem = {sign, mant, exp
var s, m, e
s = (sign : uint32)
- e = (exp : uint32) & 0x3ff
+ e = (exp : uint32) & 0xff
m = (mant : uint32) & ((1<<22) - 1)
-> std.flt32frombits(s << 31 | e << 22 | m)