Skip to content

L2 muse spark 1.3 - #619

Open
LSantha wants to merge 15 commits into
masterfrom
L2-MuseSpark-1.3
Open

L2 muse spark 1.3#619
LSantha wants to merge 15 commits into
masterfrom
L2-MuseSpark-1.3

Conversation

@LSantha

@LSantha LSantha commented Sep 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

Revisit the command-line installer so a headless install needs no
interactive device entry:

- Resolve the target device from a CLI arg, an auto-discovered single JFAT
  mount, or an interactive prompt fallback, and feed it to the actions via
  the new ActionConstants.DEVICE_ID context value.
- GrubInstallerAction reads DEVICE_ID from the context (prompting only when
  absent) instead of always asking, so the install runs non-interactively
  once the device is known.
- Run CopyFilesAction before GrubInstallerAction so stage1.5 does not
  corrupt the freshly written FAT; resolve the mount point by filesystem
  identity (same as JGrub.getMountPoint) rather than by path substring.

Enabled by caching the InputContext/OutputContext so values pre-set in
start() survive the inherited super.start() run.
CG-0: L2HostTest (T0 unit) + L2PipelineTest (T1 pipeline, T3 emitter
shapes) registered in CoreTestSuite; host-JDK runnable, no boot needed.
CG-1: fRem fold, LiveRange overlap, LADD/LSUB/LCMP wrong-code paths,
FREM/DREM x87 balance, call-result ESP->EBP, missing checkLabels, label
table growth, dominated-tree rebuild, IRTest lookup, text-asm ccName.
26/26 host tests green. L2 remains test-only.
Matrix: 11 int ALU ops x 16 reachable modes + commutative swap +
unary matrix + unary-const-throws contract (L2ModeMatrixTest, in suite).
Wire dead FP-compare path: BinaryQuad -> generateCompareOP ->
FPX86CodeGenerator (FCMP*/DCMP* threw before). Fix 4 shift copy-paste
sites (B11), clone() location consistency (B12). Shared L2TestVm
bootstrap (single VmImpl per JVM). 32/32 host tests green.
Refactor both deconstrucSSA overloads onto shared deconstructPhiList
(sort + MethodArgument null-guard; the filtering overload NPE'd on
arg-sourced phis and misordered phi-of-phi chains). Analysis: the
live-gated filter cannot fire (def-inclusive live set) and post-DCE
surviving phis all have live uses, so wiring it is a no-op --
pinned by testAnchorL2_022_postDcePhisAllUsed. True pruning needs
OPT-11 block liveness. Zero behavior change. 33/33 host tests green.
Pin L/D/F values to spill slots (float pin, wide-const gate in
BinaryQuad.doPass2) so SSS is the only reachable wide shape; add
optimize+DCE closure pair (kill/revive convergence, B15). Implement:
LAND/LOR/LXOR/LSHL/LSHR/LUSHR (+writeLongShift), LCMP (SSS/RSS/SSC),
all converts (S,S)/(S,R), B13 mistype fix. Checker deletions match
implemented bytecodes; lmul/ldiv/lrem explicitly rejected (CG-5).
Corpus ladd/lsub/land/lor/lxor enabled. 39/39 host tests green.
Fix default jumps (B16): helper/bytecode-address labels are never
positioned post-fixup; use the last targetBlocks entry (block-based).
Delete checker rejections. Corpus switchDense (PIC), switchSmall
(linear tableswitch), switchSparse (lookupswitch); T1 compiles +
lowering-shape tests. 41/41 host tests green.
Enable iaload/faload/aaload/iastore/fastore/aastore/arraylength/
newarray/anewarray (scale-4 cubes reviewed; type guards fail loud on
deferred widths). Fix B18 (callJavaMethod keeps EAX-result model;
shared invokeJavaMethod NPEs with L2's null stackMgr), float/double
const materialization (S<-C, ConstantRefAssign, VarReturn-double).
Corpus array ops + dret; T1/T3/checker tests. 45/45 host tests green.
Wire L1A-ported instanceOf/instanceOfClass via shared writeInstanceTest
(class fast path, interface/array loop, null passes, ECX/EBX discipline);
checkcast fails via classCastFailed; strings via shared statics; New*
+ ConstantClass to callJavaMethod + PUSH/POP ECX (caller-saved).
Object-new end-to-end needs invokespecial (CG-4e). Corpus type ops;
T1/checker tests. 47/47 host tests green.
getstatic/putstatic/getfield/putfield, all widths: static+instance
init emission (L1A mirror), STACK paths (were silent no-ops),
isolated tmp EDX (was live-clobbering ESI, B19), wide via 64-bit
helpers, float loads via x87, null-const fault traps, GC barriers
for ref stores (incl. aastore). Corpus fields; T1/checker tests.
49/49 host tests green.
Shared storeCallResult (EAX/+EDX halves); callJavaMethod + PUSH/POP
ECX on fall-through paths; SP math before pushes; interface receiver
depth via slot-based Signature.getArgSlotCount (B20); writeParameters
long/double consts + double halves (L1A-consistent order); magic
callees fail loud. Corpus calls incl. new+ctor; T1/checker tests.
51/51 host tests green.
pop/pop2/dup/dup_x1/dup2 enabled (exotic dup forms, jsr/ret stay
gated); athrow via handler edges; monitorenter/exit to callJavaMethod
+ ECX wrap. Corpus try/catch, throw, sync method/block, dup/pop/
concat; T1/checker tests. 53/53 host tests green.
Arrays: 8-byte (scale-8 SIB) and sub-word (MOVSX/ZX, narrow stores)
via normalized scratch-reg paths; null-const refs fault via
getReferencedOps. Dups: dup_x2-f2/dup2_x1-f1/dup2_x2/swap from JVM
slot math (fix dup_x2 misroute, dup2 missing high copy, dup2_x1-f2
dropped half); high halves sourced from bases (no defining quads);
producers type both slots, dups type new slots. jsr/ret via L1A
CALL-model (JsrQuad/RetQuad): int-typed address, DCE-kept, Finder
splits + ret->resume dataflow edges, per-edge depths. JsrProbeBuilder
generates a validated jsr/ret class for T1. 57/57 host tests green.
- US-ASCII: replace 17 em-dashes in own comments (encoding-fix
  would rewrite the tree; assemble requires ASCII sources).
- FPX86CodeGenerator: drop erroneous SLOTSIZE adjust on FLD64
  (doubles are qword-at-disp); pin with DCMPG/DCMPL/FCMPL offset
  tests.
- writeStaticBarrier: full L1A push shape (wb, shared-flag,
  statics index, value); setSObj corpus so the path compiles.
- Test pipeline + IRTest stage order literally match doCompile
  (single fixupAddresses; x86cg after fixup; initMethodArguments
  in runToPostDce).
- terniary22 comments corrected to precise wording.
58/58 host tests green.
LMUL ports L1A's inline sequence (fast path + 4-MUL, EBX/ECX/ESI
saved, EDI + STATICS reload in L1A parity); LDIV/LREM call the
shared Java helpers L1A uses via writeParameters + halves store.
Delete the last checker rejections; corpus lmul/ldiv/lrem; T1 and
shape tests. 59/59 host tests green.
L2ByteCodeSupportChecker no longer rejects anything (dead flag,
dead notSupported, one empty override, phase comments). canCompile
parses with a base visitor (still fail-fast on malformed bytecode).
The vacuous gate tests go with it, replaced by one canCompile smoke
test over previously-gated families. 53/53 host tests green.
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.

1 participant