All 3 compilers ✅ PASS — no issues#569
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:2292-2341Analysis:
IntItemvalues from virtual stack (vstack.popInt()×2) — matches JVM spec "..., value1, value2 → ..."X86Constants.JGE(0x8D, "Jump if Greater or Equal" signed) — matches JVM spec "ge succeeds if and only if value1 ≥ value2 (signed)"address + gets2()wheregets2()reads signed 16-bit offset — matches JVM spec "(branchbyte1 << 8) | branchbyte2" as signed 16-bitvstack.push(eContext)before emitting jump — correct for control-flow boundariesprepareForOperationensuresvalue1(v1) is in a register;value2(v2) can be register, local, or constant — correct for x86 CMP dest, srcl1b Implementation
core/src/core/org/jnode/vm/x86/compiler/l1b/X86BytecodeVisitor.java:2809-2884Analysis:
visit_if_icmphelper andvisit_if_icmpgedispatchcountBytecode,countConstOps) for metrics — no functional impactl2 Implementation
core/src/core/org/jnode/vm/x86/compiler/l2/GenericX86CodeGenerator.java:3787-3824(codegen)core/src/core/org/jnode/vm/compiler/ir/quad/BranchCondition.java:30-31(IR enum)core/src/core/org/jnode/vm/compiler/ir/IRGenerator.java:917(IR generation)core/src/core/org/jnode/vm/bytecode/BasicBlockFinder.java:218-223(stack simulation)Analysis:
BranchCondition.IF_ICMPGE(">=", true)—binary=truecorrectly indicates two stack operandsIRGenerator.visitBranchConditioncreatesConditionalBranchQuadwith two stack slots (s1, s2) of typeOperand.INT— matches stack effectJvmType.INTfrom type stack, callsaddBranch(address, true)andcondYieldPoint— correct control-flow constructiongenerateJumpForBinaryConditionswitches onIF_ICMPGE→ emitsos.writeJCC(target, X86Constants.JGE)— correct signed ≥L2ByteCodeSupportCheckerdoes NOT overridevisit_if_icmpge— inherits empty impl fromBytecodeVisitorSupport, meaning instruction is supported (unsupported ops explicitly throw)BytecodeParser.gets2()) for signed 16-bit target — correctJVM Spec References (Java SE 6)
if_icmpge= 162 (0xA2)..., value1, value2 → ...(bothint, both popped)value1 ≥ value2branchbyte1,branchbyte2; target =address + offsetAll three JNode compiler tiers implement the above faithfully. No spec violations found.
Closes #400
opencode session | github run