l1a/l1b: PASS; l2: FAIL (unsupported)#558
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
Details
l1a Implementation
core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java:2078-2111,core/src/core/org/jnode/vm/x86/compiler/l1a/VirtualStack.java:178-180IntItemfrom virtual stack. For constants, createsLongItemwith sign-extended value. For register values, ensures input is in EAX, then usesCDQ(32-bit) orCDQE(64-bit) to sign-extend to 64-bit result in EDX:EAX or RAX respectively. CreatesLongItem(category-2) with proper register pairing. Pushes result to virtual stack. Operand stack effect (int → long) correctly handled.l1b Implementation
core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java:2504-2540,core/src/core/org/jnode/vm/x86/compiler/l1b/VirtualStack.java:177-179CDQ/CDQE, constant folding, and category-2LongItemcreation. Operand stack effect matches spec.l2 Implementation
core/src/core/org/jnode/vm/x86/compiler/l2/L2ByteCodeSupportChecker.java:260-262,core/src/core/org/jnode/vm/x86/compiler/l2/GenericX86CodeGenerator.java:414,491,568,648L2ByteCodeSupportChecker.visit_i2l()explicitly callsnotSupported()(line 261), causing any method containingi2lto be rejected from L2 compilation and fall back to L1.GenericX86CodeGeneratorhas partial implementation: register-to-register variants (lines 414, 491) throwIllegalArgumentException("Unknown operation: I2L"), while memory-operand variants (lines 568-577, 648-657) correctly implement sign-extension viaCDQand proper 64-bit stack slot storage (high word atlhsDisp, low word atlhsDisp - SLOTSIZE).UnaryOperation.I2Lbut the support checker prevents its use.JVM Spec Reference (Java SE 6):
i2l(0x85): "The value on the top of the operand stack must be of type int. It is popped from the operand stack and sign-extended to a long result. That result is pushed onto the operand stack."..., value → ..., result(category-1 → category-2)Closes #295
opencode session | github run