FA-89894 / Bytecode virtual machines / Member archive
JVM int32 opcodes: iushr sign-extends · case 04
Unsigned right shifts of negative ints stay negative.
Case contract
Each op is [name, a, b] over 32-bit two's complement ints: iadd/imul wrap; idiv truncates toward zero and MIN_VALUE / -1 wraps to MIN_VALUE; irem has the sign of the dividend; ishl/ishr/iushr use only the low five bits of the shift count, iushr shifts in zeros; ineg wraps. Division by zero yields "ArithmeticException", an unknown op "VerifyError".
Why this case matters
Bytecode integer opcodes must reproduce fixed-width semantics that host-language integers do not.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| iushr is a logical shift with masking | [-1, -1] | [15, 16777215] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗