Repository navigation
feat(db,emitter,tui,cg,analyzer): resolve jump-vector _LVO equates and preserve biased EAPCIndex code cells - #9
Merged
Conversation
…d preserve biased EAPCIndex code cells - Add BuildJumpVectorLVOMap, FormatVectoredOpStr, and SortedJumpVectorSlots in internal/db to resolve non-zero disp(aN) jump-vector calls/jumps to _LVO_<Target> equates (with duplicate-target disambiguation and disp==0 EAAddrInd parity guard). - Emit _LVO_<Target> equ blocks in src/equates.i (and single-file header) and format vectored operands across emitter, TUI listing/XRefs, call graph (cg), hunks disasm, and hunks search. - Fix multi-element CellDataB/CellDataW/CellDataL emission in emitter and CLI disasm/search. - Scope Step 6 interior-label CODE cell invalidation in stage2DiscoverCode to HUNK_RELOC32 targets and exclude biased d8(PC,Xn) (EAPCIndex) base addresses from dataReadTargets so instructions containing biased index base labels (e.g. hunk6:0x0BF4) are preserved and emit interior equ definitions. - Wrap pre-analysis cell cleanup in applyCodeHintsBatch inside ctrl.WithActiveSeg.
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.
Summary
_LVO_<Target>Jump-Vector Offset Resolution:BuildJumpVectorLVOMap,FormatVectoredOpStr, andSortedJumpVectorSlotsininternal/db/controller.goto resolve non-zerodisp(aN)jump-vector calls/jumps (jsr/jmp) to symbolic_LVO_<Target>(aN)operands dynamically fromDetectJumpVectorBases+GetLabelsMap(zero DB schema orproject.jsonchanges).disp == 0parity guard so 2-bytejsr (a5)(EAAddrInd) is never promoted to 4-byteEADisp16._LVO_<Target>_<HexDisp>fallback).; --- Jump Vector (_LVO) Equates ---blocks insrc/equates.i(--amiga) and single-file output, and formats vectored operands across all 5 surfaces: Emitter (src/*.asm), TUI listing &xXRefs popup, Call Graph (hunks cg),hunks disasm, andhunks search.d8(PC,Xn)(EAPCIndex) Interior-Label Code Preservation:m68k.EAPCIndexbase addresses fromdataReadTargetsinstage2DiscoverCode(RefDataRead).CODEcell invalidation instage2DiscoverCodetoHUNK_RELOC32targets (a.RelocTargets), preserving valid instructions (such ashunk6:0x0BF4bra.w Combat_SpawnLaserHitSmokePuff) whose extension words serve as biasedd8(PC,Xn)index base labels, and emits interiorequdefinitions ininternal/emitter/emitter.go.CellDataB/CellDataW/CellDataLformatting (cell.Size > 1) ininternal/emitter/emitter.goandcmd/hunks/agent_cmds.go.DeleteCellsInRange,ClearOverlaps,DeleteLabelsInRange) insidectrl.WithActiveSeg(segName, ...)inapplyCodeHintsBatch.Verification
go build ./...,go vet ./..., andgo test -v ./...pass with 0 warnings.vasmm68k_mot+scripts/verify_parity.pyload-image parity againstfrontier.