Skip to content

istore_2: All 3 tiers PASS spec compliance.#575

Open
opencode-agent[bot] wants to merge 1 commit into
masterfrom
opencode/issue324-20260629184833
Open

istore_2: All 3 tiers PASS spec compliance.#575
opencode-agent[bot] wants to merge 1 commit into
masterfrom
opencode/issue324-20260629184833

Conversation

@opencode-agent

Copy link
Copy Markdown

Thecompliance analysis is complete. All three JNode compiler tiers (L1A, L1B, L2) correctly implement istore_2 per the JVM specification.

Summary:

  • L1A (X86BytecodeVisitor.java:2931-2933, wstore at lines 4375-4421): Correctly decodes implicit index 2, pops IntItem from virtual stack, computes EBP-relative offset, handles constant/register/stack/FPU cases.
  • L1B (X86BytecodeVisitor.java:3646-3651, wstore at lines 5368-5424): Same correct behavior with additional constant-local tracking.
  • L2 (IRGenerator.java:387-392, GenericX86CodeGenerator.java:278-345): IR generation emits VariableRefAssignQuad(stackOffset→index) with correct type (INT, category-1); codegen handles all addressing modes; support checker doesn't throw UnsupportedOperationException.

JVM Spec (JVMS §6.5.istore_2): Opcode 0x3d, pops one int from stack, stores into local variable 2. Implicit index=2. Wide prefix supported (16-bit index).

Full report saved to istore_2_compliance_report.md.

Closes #324

New%20session%20-%202026-06-29T18%3A48%3A32.379Z
opencode session  |  github run

Co-authored-by: LSantha <LSantha@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JVM instruction spec compliance: istore_2

0 participants