afonso360 opened PR #3223 from interpreter-fix-div-panic
to main
:
Closes #3191
abrown submitted PR review.
abrown submitted PR review.
abrown created PR review comment:
I obviously don't understand this change because I would have expected the interpreter to trap in this situation but here it happily returns 0?
cfallin submitted PR review.
cfallin created PR review comment:
I guess it's
udiv
vs.sdiv
? 32768 / 65535 (-1
) is ~0.5 or 0 rounded down.
afonso360 submitted PR review.
afonso360 created PR review comment:
Yes exactly,
udiv
is not supposed to trap in this situation (onlysdiv
). The -1 is a bit misleading here, because the denominator is interpreted as0xFFFF
.
afonso360 updated PR #3223 from interpreter-fix-div-panic
to main
.
abrown submitted PR review.
abrown submitted PR review.
abrown created PR review comment:
Ah, that's it, thanks!
abrown merged PR #3223.
Last updated: Nov 22 2024 at 17:03 UTC