Stream: git-wasmtime

Topic: wasmtime / issue #1044 Missing variants of umul/smul/ushl...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2023 at 18:08):

jameysharp commented on issue #1044:

Can we close this now that #5784 is merged, or do folks still want overflow-checking variants for shifts?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2023 at 20:59):

cfallin commented on issue #1044:

It might be useful to leave open until we do; @T0b1-iOS if you're interested in pushing this further, I'd be happy to review overflow-checking shifts as well! (Of course this is only if you want to: we can just as well leave this for someone else to pick up later!)

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2023 at 21:19):

jameysharp commented on issue #1044:

After I wrote that question, I got thinking that it's not clear to me there's as much value in dedicated CLIF instructions for overflow-checked shifts. With addition and multiplication, there's often hardware support for detecting overflow as a side effect of the computation. But with shifts I don't think we can generate code that's any better than you'd get from explicitly writing something like icmp uge shift_amt, 64 for the overflow output of an I64 shift, right?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2023 at 21:25):

cfallin commented on issue #1044:

Yeah, that's a good point actually. AFAIK the shift instructions at least on x86-64 and aarch64 have native wrapping behavior. So I agree there's no real reason to expect we could do any better. Given that I guess I'll close this but if new arguments for these ops arise, we can always reconsider!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2023 at 21:25):

cfallin closed issue #1044.


Last updated: Nov 22 2024 at 16:03 UTC