FA-89889 / Bytecode virtual machines / Member archive
JVM int32 opcodes: ishl shifts by the full count · case 04
Shifting by 32 clears the value instead of leaving it unchanged.
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 |
|---|---|---|---|
| ishl masks the shift count to five bits | [0, 0] | [5, 96] | 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 ↗