l1a/l1b: PASS; L2: FAIL (LREM unimplemented)#566
Open
opencode-agent[bot] wants to merge 1 commit into
Open
Conversation
Co-authored-by: LSantha <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec Compliance Report for
lreml1a (
X86BytecodeVisitor.java:3371)32-bit mode: Delegates to
MathSupport.lrem()which explicitly checksden == 0and throwsArithmeticException. HandlesLong.MIN_VALUE % -1edge case correctly per spec identity(a/b)*b + (a%b) == a.64-bit mode: Uses x86
IDIVdirectly. Hardware raises#DEon divide-by-zero; VM catchesEX_DIV0and throwsArithmeticException(VmThread.java:1391-1393). Operand stack effect correct (pops 2 category-2, pushes 1 category-2).l1b (
X86BytecodeVisitor.java:4212)Identical implementation to l1a with same correctness. Only difference is counter instrumentation.
L2 (
GenericX86CodeGenerator.java,L2ByteCodeSupportChecker.java)Complete failure: All 16
LREMcase labels (and all other long arithmetic ops:LDIV,LMUL,LADD,LSUB,LAND,LOR,LXOR,LSHL,LSHR,LUSHR,LNEG,LCMP) throwIllegalArgumentException("Unknown operation").L2ByteCodeSupportCheckerdoesn't rejectlrem, so methods containing it passcanCompile()but fail at code generation.Systemic gap: The entire
long/doublearithmetic category is unimplemented in L2.Closes #350
opencode session | github run