All 3 compilers FAIL: l1a/l1b miss returnAddress push/type; L2 explicitly unsupported#561
Open
opencode-agent[bot] wants to merge 1 commit into
Open
All 3 compilers FAIL: l1a/l1b miss returnAddress push/type; L2 explicitly unsupported#561opencode-agent[bot] wants to merge 1 commit into
opencode-agent[bot] wants to merge 1 commit into
Conversation
…itly unsupported 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
jsr_wDetails
l1a Implementation
core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java:2960-2962,core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java:3886-3892visit_jsronly emitsos.writeCALL(helper.getInstrLabel(address)). Per JVM spec, the address of the next instruction (return address) must be pushed onto the operand stack as areturnAddresstype value. The x86 CALL pushes to hardware stack, not JVM operand stack.returnAddresstype is not represented inJvmType,Itemhierarchy, or type system. NoReturnAddressItemclass exists.visit_retdoesos.writeJMP(helper.BP, ebpOfs)— jumps to address stored in local variable — butjsrnever pushed that address to the operand stack for subsequentastoreby the subroutine.BytecodeParser.java:890-891): Properly decodes 32-bit signed offset viagets4()and computes absolute target.l1b Implementation
core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java:3687-3692,core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java:4830-4839writeCALLimplementation, same missing operand stack push, same missingreturnAddresstype, sameret/jsrasymmetry.l2 Implementation
core/src/core/org/jnode/vm/x86/compiler/l2/L2ByteCodeSupportChecker.java:163-165core/src/core/org/jnode/vm/compiler/ir/IRGenerator.java:1321-1323core/src/core/org/jnode/vm/compiler/ir/IRBasicBlockFinder.java:216-220L2ByteCodeSupportChecker.visit_jsrandIRGenerator.visit_jsrthrowUnsupportedOperationException.IRBasicBlockFinder.visit_jsrdoesn't add branch target or fall-through as successors.Operandtype system has noRETURN_ADDRESScategory.Key JVM Spec Requirements (from https://docs.oracle.com/javase/specs/jvms/se6/html/Instructions2.doc7.html)
... → ..., address(pushesreturnAddresstype)jsr_wpushes to operand stack;retretrieves from local variableCloses #330
opencode session | github run