You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix .dword replicating the low bits instead of sign-extending
This bug was caused by a few issues. First, when adding .dword
I decided to allow existing code to handle the fits within 32
bit case. The old code could not possibly handle that correctly.
Second, lengthinbytes = 8 was passed into the Memory system, given
that it takes an int as data and there are only 4 bytes in an
int it doesn't have defined behaviour for 8 bytes. Third, javas
shifting loops after 32 for integers. So in total, I failed to
account for a case, passed an undefined input into memory, which
resulted in replicated behaviour due to java.
I fixed it by just always handling the writes for .dword directly.
0 commit comments