mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 21:36:06 -04:00
chore(phase-29): preserve the remaining behemoth-2 analysis tools (b2_cmp/dump/map/marks/side)
This commit is contained in:
+1
-38
@@ -12,13 +12,11 @@
|
||||
{"ts": "2026-07-14 12:56:23", "addr": "0x801708b0", "name": "func_801708B0", "reach": 134, "klass": "WAVE", "nins": 30, "status": "near", "closeness": 0, "where_stuck": "match_one MATCH but gate rejected (declaration/TU plumbing)", "best_draft": ".run/backlog_drafts/func_801708B0.c", "binary": "ov_SC01_077", "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-06-21 12:11:25", "addr": "0x801718ac", "name": "func_801718AC", "reach": 134, "klass": "WAVE", "nins": 22, "status": "failed", "closeness": null, "where_stuck": "won't compile standalone (loose-typing / missing decl)", "best_draft": ".run/backlog_drafts/func_801718AC.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-06-21 22:01:56", "addr": "0x80174cb0", "name": "func_80174CB0", "reach": 134, "klass": "regalloc-order", "nins": 123, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (match_one 123/123). Levers: (1) \u00a721 one combined stack struct {s32 a[5]; ...}", "best_draft": ".run/backlog_drafts/func_80174CB0.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-06-21 22:01:56", "addr": "0x80169228", "name": "func_80169228", "reach": 134, "klass": "regalloc-order", "nins": 105, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (105 ins, relocation-masked). Key levers: arg0/p pinned $s1/$s0,", "best_draft": ".run/backlog_drafts/func_80169228.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-06-21 15:17:04", "addr": "0x801463a0", "name": "func_801463A0", "reach": 134, "klass": "struct", "nins": 101, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (101 ins, match_one); real symbol names; misaligned 8B copy + s16 stores + masked B9C last", "best_draft": ".run/backlog_drafts/func_801463A0.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-02 13:22:36", "addr": "0x8014d12c", "name": "func_8014D12C", "reach": 134, "klass": "WAVE", "nins": 93, "status": "near", "closeness": 53, "where_stuck": "WAVE: 53 mismatch", "best_draft": ".run/backlog_drafts/func_8014D12C.c", "binary": "ov_SC01_077", "source": "glm-big", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-23 13:52:28", "addr": "0x80177940", "name": "func_80177940", "reach": 138, "klass": "schedule", "nins": 101, "status": "near", "closeness": 17, "where_stuck": "17/101 (count-matched). Prologue/loop-body/IV/preheader-consts/post-loop all MATCH. Residual = 3 sched2 position swaps: param_4<<16 (idx19 vs 23), a1=puVar5 init (idx42 vs 47), *puVar5 prim (a2/order vs v0) \u2014 pure post-regalloc scheduling, permuter territory.", "best_draft": ".run/backlog_drafts/func_80177940.c", "binary": "ov_SC07_006", "source": "worker", "residual": [[19, "00118c00 sll\ts1,s1,0x10", "2663ffec addiu $v1, $s3, -0x14"], [20, "2663ffec addiu\tv1,s3,-20", "00641824 and $v1, $v1, $a0"], [21, "00641824 and\tv1,v1,a0", "3c040300 lui $a0, (0x3000000 >> 16)"], [22, "3c040300 lui\ta0,0x300", "00641825 or $v1, $v1, $a0"], [23, "00641825 or\tv1,v1,a0", "00118c00 sll $s1, $s1, 16"], [42, "2485000c addiu\ta1,a0,12", "240d0003 addiu $t5, $zero, 0x3"], [43, "240d0003 li\tt5,3", "240c0001 addiu $t4, $zero, 0x1"], [44, "240c0001 li\tt4,1", "3c0900ff lui $t1, (0xFFFFFF >> 16)"], [45, "3c0900ff lui\tt1,0xff", "3529ffff ori $t1, $t1, (0xFFFFFF & 0xFFFF)"], [46, "3529ffff ori\tt1,t1,0xffff", "3c0b0300 lui $t3, (0x3000000 >> 16)"], [47, "3c0b0300 lui\tt3,0x300", "2485000c addiu $a1, $a0, 0xC"], [68, "000630c0 sll\ta2,a2,0x3", "aca2fffc sw $v0, -0x4($a1)"], [69, "24c60008 addiu\ta2,a2,8", "000610c0 sll $v0, $a2, 3"], [70, "01463025 or\ta2,t2,a2", "24420008 addiu $v0, $v0, 0x8"], [71, "34c64000 ori\ta2,a2,0x4000", "34424000 ori $v0, $v0, 0x4000"], [72, "aca2fffc sw\tv0,-4(a1)", "01421025 or $v0, $t2, $v0"], [74, "aca60000 sw\ta2,0(a1)", "aca20000 sw $v0, 0x0($a1)"]], "passes_tried": null}
|
||||
{"ts": "2026-07-14 12:56:18", "addr": "0x8014c6f4", "name": "func_8014C6F4", "reach": 134, "klass": "WAVE", "nins": 91, "status": "near", "closeness": 14, "where_stuck": "WAVE: 14 mismatch", "best_draft": ".run/backlog_drafts/func_8014C6F4.c", "binary": "ov_SC01_077", "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 14:33:44", "addr": "0x8014d4c0", "name": "func_8014D4C0", "reach": 138, "klass": "other", "nins": 84, "status": "near", "closeness": 15, "where_stuck": "initial draft \u2014 modeled on the byte-matched sibling DEFINE_func_8014CD80 (engine_core.h)", "best_draft": ".run/backlog_drafts/func_8014D4C0.c", "binary": "ov_SC07_006", "source": "t6-recover", "residual": [[57, "10400011 beqz\tv0,12c <func_8014D4C0+0x12c>", "14400004 bnez $v0, .L8014D5B8"], [59, "96420000 lhu\tv0,0(s2)", "a2000074 sb $zero, 0x74($s0)"], [60, "00000000 nop", "0805357d j .L8014D5F4"], [61, "a6220006 sh\tv0,6(s1)", "ae200174 sw $zero, 0x174($s1)"], [62, "96420002 lhu\tv0,2(s2)", "96420000 lhu $v0, 0x0($s2)"], [64, "a622000a sh\tv0,10(s1)", "a6220006 sh $v0, 0x6($s1)"], [65, "96420004 lhu\tv0,4(s2)", "96420002 lhu $v0, 0x2($s2)"], [67, "a622000e sh\tv0,14(s1)", "a622000a sh $v0, 0xA($s1)"], [68, "92050075 lbu\ta1,117(s0)", "96420004 lhu $v0, 0x4($s2)"], [70, "02202021 move\ta0,s1", "a622000e sh $v0, 0xE($s1)"], [71, "304300ff andi\tv1,v0,0xff", "92050075 lbu $a1, 0x75($s0)"], [72, "24020001 li\tv0,1", "0c053246 jal func_8014C918"], [74, "a623016e sh\tv1,366(s1)", "304300ff andi $v1, $v0, 0xFF"], [75, "a2000074 sb\tzero,116(s0)", "24020001 addiu $v0, $zero, 0x1"], [76, "ae200174 sw\tzero,372(s1)", "a623016e sh $v1, 0x16E($s1)"]], "passes_tried": null}
|
||||
{"ts": "2026-06-21 22:01:55", "addr": "0x80156670", "name": "func_80156670", "reach": 134, "klass": "schedule", "nins": 83, "status": "failed", "closeness": null, "where_stuck": "none \u2014 MATCH (83 ins). Key: hoist `iVar1 = uVar3*4;` as its OWN statement before the if so gcc schedules `sll v1,s1,2` into the bnez delay slot (computed unconditionally) and reuses v1 index-first (`iVar1 + (s32)&D_801150E0` \u2192 `addu v0,v1,v0`). 13-arg call to func_80157158 (a0-a3 + 9 stack args at 0x10..0x30); param_2/param_3 cast (u16) \u2192 andi; param_6 incoming as lhu(u16). Address args = integer math `iVar2 + (s32)&D_x` (index-first \u2192 lui;addiu;addu, index added first).", "best_draft": ".run/backlog_drafts/func_80156670.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:46:43", "addr": "0x80156670", "name": "func_80156670", "reach": 138, "klass": "regalloc-order", "nins": 83, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (83 ins). param_2/param_3 as s32 (not u16) flips the $s5/$s6 tie-break", "best_draft": ".run/backlog_drafts/func_80156670.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-14 12:56:18", "addr": "0x8014cf04", "name": "func_8014CF04", "reach": 134, "klass": "WAVE", "nins": 82, "status": "near", "closeness": 27, "where_stuck": "WAVE: 27 mismatch", "best_draft": ".run/backlog_drafts/func_8014CF04.c", "binary": "ov_SC01_077", "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 14:33:44", "addr": "0x8014d2a0", "name": "func_8014D2A0", "reach": 138, "klass": "struct", "nins": 80, "status": "near", "closeness": 2, "where_stuck": "first draft \u2014 u8* IV walk over D_801202A0 with 0x10C stride, sibling-shaped after DEFINE_func_80163950()", "best_draft": ".run/backlog_drafts/func_8014D2A0.c", "binary": "ov_SC07_006", "source": "t6-recover", "residual": [[31, "10500020 beq\tv0,s0,100 <func_8014D2A0+0x100>", "12020020 beq $s0, $v0, .L8014D3A0"], [35, "1050001c beq\tv0,s0,100 <func_8014D2A0+0x100>", "1202001c beq $s0, $v0, .L8014D3A0"]], "passes_tried": null}
|
||||
{"ts": "2026-07-14 12:56:18", "addr": "0x8014d610", "name": "func_8014D610", "reach": 134, "klass": "WAVE", "nins": 74, "status": "near", "closeness": 60, "where_stuck": "WAVE: 60 mismatch", "best_draft": ".run/backlog_drafts/func_8014D610.c", "binary": "ov_SC01_077", "source": "worker", "residual": null, "passes_tried": null}
|
||||
@@ -29,7 +27,6 @@
|
||||
{"ts": "2026-06-22 00:05:13", "addr": "0x80161774", "name": "func_80161774", "reach": 134, "klass": "plumbing", "nins": 69, "status": "near", "closeness": 53, "where_stuck": "none \u2014 MATCH (69 ins, match_one verified; clean nested-if; param_1 -> $s0 call-crossing)", "best_draft": ".run/backlog_drafts/func_80161774.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-06-22 00:53:10", "addr": "0x8014e5b4", "name": "func_8014E5B4", "reach": 134, "klass": "regalloc-order", "nins": 59, "status": "near", "closeness": 23, "where_stuck": "none \u2014 MATCH", "best_draft": ".run/backlog_drafts/func_8014E5B4.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-06-22 00:53:11", "addr": "0x801759d8", "name": "func_801759D8", "reach": 134, "klass": "schedule", "nins": 56, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (56 ins)", "best_draft": ".run/backlog_drafts/func_801759D8.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-06-22 02:10:00", "addr": "0x801777bc", "name": "func_801777BC", "reach": 134, "klass": "schedule", "nins": 59, "status": "near", "closeness": 29, "where_stuck": "body byte-matches; residual ~3 ins = prologue instruction-scheduling (final `sll t8,16` / `lw param_7` / `addu t0,a0,0xC` ordering around the blez guard) + the loop-counter copy `addu t3,v0` \u2014 pure gcc sched/regalloc tie-break, permuter-blocked by the register __asm__ pins", "best_draft": ".run/backlog_drafts/func_801777BC.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-02 13:22:37", "addr": "0x80151c54", "name": "func_80151C54", "reach": 134, "klass": "PINS", "nins": 52, "status": "near", "closeness": 0, "where_stuck": "match_one MATCH but gate rejected (declaration/TU plumbing)", "best_draft": ".run/backlog_drafts/func_80151C54.c", "binary": "ov_SC01_077", "source": "glm-big", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 14:33:44", "addr": "0x80175820", "name": "func_80175820", "reach": 138, "klass": "schedule", "nins": 55, "status": "near", "closeness": 4, "where_stuck": "body BYTE-EXACT (52 ins match); only residual is target's phantom 0x10 stack frame (args_size=16 from an eliminated call) which mine lacks \u2014 4 mismatches, all frame/tail. Barrier blocks the frame from filling block-2's delay slot where the target schedules it.", "best_draft": ".run/backlog_drafts/func_80175820.c", "binary": "ov_SC07_006", "source": "t6-recover", "residual": [[26, "00000000 nop", "27bdfff0 addiu $sp, $sp, -0x10"], [52, "03e00008 jr\tra", "27bd0010 addiu $sp, $sp, 0x10"], [53, "00000000 nop", "03e00008 jr $ra"], [54, "--", "00000000 nop"]], "passes_tried": null}
|
||||
{"ts": "2026-06-22 03:29:53", "addr": "0x801758fc", "name": "func_801758FC", "reach": 134, "klass": "schedule", "nins": 55, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (55 ins)", "best_draft": ".run/backlog_drafts/func_801758FC.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
@@ -82,7 +79,6 @@
|
||||
{"ts": "2026-06-23 12:17:56", "addr": "0x80162ccc", "name": "func_80162CCC", "reach": 134, "klass": "plumbing", "nins": 23, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH expected; direct translation, psVar1 as u16* gives lhu, $s0=param_1 survives both calls", "best_draft": ".run/backlog_drafts/func_80162CCC.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-02 11:08:32", "addr": "0x8016ba68", "name": "func_8016BA68", "reach": 134, "klass": "STUB", "nins": 29, "status": "near", "closeness": 1, "where_stuck": "STUB: 1 mismatch", "best_draft": ".run/backlog_drafts/func_8016BA68.c", "binary": "ov_SC01_077", "source": "glm-small40", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-06-24 20:13:27", "addr": "0x8012a1bc", "name": "func_8012A1BC", "reach": 134, "klass": "schedule", "nins": 78, "status": "near", "closeness": 42, "where_stuck": "42/78 \u2014 block-copy bytes correct (char[8] => lwl/lwr/swl/swr); residual is gcc's load-hoist split. Target hoists all 9 non-block scalar loads to the top then stores 4, blk, blk, then late-stores the rest; a \"memory\" barrier is needed to stop the block copy hoisting+spilling but it also pins the 5 late scalars' stores too early. No single source/barrier shape reproduces \"loads cross the block copy but the copy itself does not\" \u2014 permuter/schedule residual.", "best_draft": ".run/backlog_drafts/func_8012A1BC.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-06-24 20:13:27", "addr": "0x8012b4b8", "name": "func_8012B4B8", "reach": 134, "klass": "regalloc-order", "nins": 84, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH", "best_draft": ".run/backlog_drafts/func_8012B4B8.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-06-24 20:13:27", "addr": "0x8012cc88", "name": "func_8012CC88", "reach": 134, "klass": "struct", "nins": 105, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (105 ins, relocation-masked)", "best_draft": ".run/backlog_drafts/func_8012CC88.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-06-24 20:13:27", "addr": "0x8012e014", "name": "func_8012E014", "reach": 134, "klass": "other", "nins": 73, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (expected; straightforward struct-field + global-copy body)", "best_draft": ".run/backlog_drafts/func_8012E014.c", "binary": null, "source": "worker", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-14 12:56:15", "addr": "0x80132f40", "name": "func_80132F40", "reach": 134, "klass": "STRUCT", "nins": 72, "status": "near", "closeness": 59, "where_stuck": "STRUCT: 59 mismatch", "best_draft": ".run/backlog_drafts/func_80132F40.c", "binary": "ov_SC01_077", "source": "worker", "residual": null, "passes_tried": null}
|
||||
@@ -1705,37 +1701,4 @@
|
||||
{"ts": "2026-07-24 14:33:43", "addr": null, "name": "func_8013C360", "reach": null, "klass": "schedule", "nins": null, "status": "near", "closeness": 44, "where_stuck": "none \u2014 MATCH (-O0 pointer-walk copy; for-update post-inc gives the addu-copy, no trailing return merges loop-exit into epilogue)", "best_draft": ".run/backlog_drafts/func_8013C360.c", "binary": "ov_SC07_006", "source": "t6-recover", "residual": [[0, "27bdfff8 addiu\tsp,sp,-8", "27bdfff0 addiu $sp, $sp, -0x10"], [1, "24860010 addiu\ta2,a0,16", "afbe0008 sw $fp, 0x8($sp)"], [2, "8c820008 lw\tv0,8(a0)", "03a0f021 addu $fp, $sp, $zero"], [3, "00000000 nop", "afc40010 sw $a0, 0x10($fp)"], [4, "1040000a beqz\tv0,3c <func_8013C360+0x3c>", "8fc20010 lw $v0, 0x10($fp)"], [5, "00002821 move\ta1,zero", "00000000 nop"], [6, "8cc30000 lw\tv1,0(a2)", "24430010 addiu $v1, $v0, 0x10"], [7, "8cc20004 lw\tv0,4(a2)", "afc30000 sw $v1, 0x0($fp)"], [8, "00000000 nop", "afc00004 sw $zero, 0x4($fp)"], [9, "ac620000 sw\tv0,0(v1)", "8fc30010 lw $v1, 0x10($fp)"], [10, "8c820008 lw\tv0,8(a0)", "00000000 nop"], [11, "24a50001 addiu\ta1,a1,1", "24620008 addiu $v0, $v1, 0x8"], [12, "00a2102b sltu\tv0,a1,v0", "8fc30004 lw $v1, 0x4($fp)"], [13, "1440fff8 bnez\tv0,18 <func_8013C360+0x18>", "8c420000 lw $v0, 0x0($v0)"], [14, "24c6000c addiu\ta2,a2,12", "00000000 nop"], [15, "27bd0008 addiu\tsp,sp,8", "0062182b sltu $v1, $v1, $v0"], [16, "03e00008 jr\tra", "14600003 bnez $v1, .L8013C3B0"], [18, "--", "0804f100 j .L8013C400"], [19, "--", "00000000 nop"], [20, "--", "8fc30000 lw $v1, 0x0($fp)"], [21, "--", "00000000 nop"], [22, "--", "8c620000 lw $v0, 0x0($v1)"], [23, "--", "8fc40000 lw $a0, 0x0($fp)"], [24, "--", "00000000 nop"]], "passes_tried": null}
|
||||
{"ts": "2026-07-24 14:33:44", "addr": null, "name": "func_80142B2C", "reach": null, "klass": "plumbing", "nins": null, "status": "failed", "closeness": null, "where_stuck": "none \u2014 MATCH", "best_draft": ".run/backlog_drafts/func_80142B2C.c", "binary": "ov_SC07_006", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 14:34:21", "addr": null, "name": "func_80173A60", "reach": null, "klass": "struct", "nins": null, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH", "best_draft": ".run/backlog_drafts/func_80173A60.c", "binary": "ov_SC07_006", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:46:43", "addr": "0x8012b4b8", "name": "func_8012B4B8", "reach": 138, "klass": "regalloc-order", "nins": 84, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (84 ins)", "best_draft": ".run/backlog_drafts/func_8012B4B8.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:46:43", "addr": "0x801463a0", "name": "func_801463A0", "reach": 138, "klass": "struct", "nins": 101, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (101 ins). Keys: 8-byte BE0->BE8 unaligned copy via char[8] struct (align 1 -> lwl/lwr/swl/swr); three sh to separate BE0/BE2/BE4 globals; D_80126B78 is s32* loaded once into $s0 at top; three short assigns MUST precede the D_80126B9C read-modify-write so the B9C store schedules last.", "best_draft": ".run/backlog_drafts/func_801463A0.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:46:43", "addr": "0x80156670", "name": "func_80156670", "reach": 138, "klass": "regalloc-order", "nins": 83, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (83 ins). param_2/param_3 as s32 (not u16) flips the $s5/$s6 tie-break", "best_draft": ".run/backlog_drafts/func_80156670.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:46:43", "addr": "0x80169228", "name": "func_80169228", "reach": 138, "klass": "struct", "nins": 105, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (105 ins). Modeled on matched sibling DEFINE_func_80169A4C (engine_core.h):", "best_draft": ".run/backlog_drafts/func_80169228.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:46:43", "addr": "0x80174cb0", "name": "func_80174CB0", "reach": 138, "klass": "regalloc-order", "nins": 123, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (123 ins)", "best_draft": ".run/backlog_drafts/func_80174CB0.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:47:27", "addr": "0x801463a0", "name": "func_801463A0", "reach": 138, "klass": "struct", "nins": 101, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (101 ins). Keys: 8-byte BE0->BE8 unaligned copy via char[8] struct (align 1 -> lwl/lwr/swl/swr); three sh to separate BE0/BE2/BE4 globals; D_80126B78 is s32* loaded once into $s0 at top; three short assigns MUST precede the D_80126B9C read-modify-write so the B9C store schedules last.", "best_draft": ".run/backlog_drafts/func_801463A0.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:47:27", "addr": "0x80156670", "name": "func_80156670", "reach": 138, "klass": "regalloc-order", "nins": 83, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (83 ins). param_2/param_3 as s32 (not u16) flips the $s5/$s6 tie-break", "best_draft": ".run/backlog_drafts/func_80156670.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:47:27", "addr": "0x80169228", "name": "func_80169228", "reach": 138, "klass": "struct", "nins": 105, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (105 ins). Modeled on matched sibling DEFINE_func_80169A4C (engine_core.h):", "best_draft": ".run/backlog_drafts/func_80169228.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:47:27", "addr": "0x80174cb0", "name": "func_80174CB0", "reach": 138, "klass": "regalloc-order", "nins": 123, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (123 ins)", "best_draft": ".run/backlog_drafts/func_80174CB0.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:48:01", "addr": "0x8012b4b8", "name": "func_8012B4B8", "reach": 138, "klass": "regalloc-order", "nins": 84, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (84 ins)", "best_draft": ".run/backlog_drafts/func_8012B4B8.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:48:01", "addr": "0x801463a0", "name": "func_801463A0", "reach": 138, "klass": "struct", "nins": 101, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (101 ins). Keys: 8-byte BE0->BE8 unaligned copy via char[8] struct (align 1 -> lwl/lwr/swl/swr); three sh to separate BE0/BE2/BE4 globals; D_80126B78 is s32* loaded once into $s0 at top; three short assigns MUST precede the D_80126B9C read-modify-write so the B9C store schedules last.", "best_draft": ".run/backlog_drafts/func_801463A0.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:48:01", "addr": "0x80156670", "name": "func_80156670", "reach": 138, "klass": "regalloc-order", "nins": 83, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (83 ins). param_2/param_3 as s32 (not u16) flips the $s5/$s6 tie-break", "best_draft": ".run/backlog_drafts/func_80156670.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:48:01", "addr": "0x80169228", "name": "func_80169228", "reach": 138, "klass": "struct", "nins": 105, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (105 ins). Modeled on matched sibling DEFINE_func_80169A4C (engine_core.h):", "best_draft": ".run/backlog_drafts/func_80169228.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:48:01", "addr": "0x80174cb0", "name": "func_80174CB0", "reach": 138, "klass": "regalloc-order", "nins": 123, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (123 ins)", "best_draft": ".run/backlog_drafts/func_80174CB0.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:48:36", "addr": "0x8012b4b8", "name": "func_8012B4B8", "reach": 138, "klass": "regalloc-order", "nins": 84, "status": "failed", "closeness": null, "where_stuck": "none \u2014 MATCH (84 ins)", "best_draft": ".run/backlog_drafts/func_8012B4B8.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:48:36", "addr": "0x801463a0", "name": "func_801463A0", "reach": 138, "klass": "struct", "nins": 101, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (101 ins). Keys: 8-byte BE0->BE8 unaligned copy via char[8] struct (align 1 -> lwl/lwr/swl/swr); three sh to separate BE0/BE2/BE4 globals; D_80126B78 is s32* loaded once into $s0 at top; three short assigns MUST precede the D_80126B9C read-modify-write so the B9C store schedules last.", "best_draft": ".run/backlog_drafts/func_801463A0.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:48:36", "addr": "0x80156670", "name": "func_80156670", "reach": 138, "klass": "regalloc-order", "nins": 83, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (83 ins). param_2/param_3 as s32 (not u16) flips the $s5/$s6 tie-break", "best_draft": ".run/backlog_drafts/func_80156670.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:48:36", "addr": "0x80174cb0", "name": "func_80174CB0", "reach": 138, "klass": "regalloc-order", "nins": 123, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (123 ins)", "best_draft": ".run/backlog_drafts/func_80174CB0.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:49:11", "addr": "0x8012b4b8", "name": "func_8012B4B8", "reach": 138, "klass": "regalloc-order", "nins": 84, "status": "failed", "closeness": null, "where_stuck": "none \u2014 MATCH (84 ins)", "best_draft": ".run/backlog_drafts/func_8012B4B8.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:49:11", "addr": "0x801463a0", "name": "func_801463A0", "reach": 138, "klass": "struct", "nins": 101, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (101 ins). Keys: 8-byte BE0->BE8 unaligned copy via char[8] struct (align 1 -> lwl/lwr/swl/swr); three sh to separate BE0/BE2/BE4 globals; D_80126B78 is s32* loaded once into $s0 at top; three short assigns MUST precede the D_80126B9C read-modify-write so the B9C store schedules last.", "best_draft": ".run/backlog_drafts/func_801463A0.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:49:11", "addr": "0x80156670", "name": "func_80156670", "reach": 138, "klass": "regalloc-order", "nins": 83, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (83 ins). param_2/param_3 as s32 (not u16) flips the $s5/$s6 tie-break", "best_draft": ".run/backlog_drafts/func_80156670.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:49:11", "addr": "0x80169228", "name": "func_80169228", "reach": 138, "klass": "struct", "nins": 105, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (105 ins). Modeled on matched sibling DEFINE_func_80169A4C (engine_core.h):", "best_draft": ".run/backlog_drafts/func_80169228.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:49:12", "addr": "0x80174cb0", "name": "func_80174CB0", "reach": 138, "klass": "regalloc-order", "nins": 123, "status": "near", "closeness": 52, "where_stuck": "none \u2014 MATCH (123 ins)", "best_draft": ".run/backlog_drafts/func_80174CB0.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": [[3, "afb20048 sw\ts2,72(sp)", "afb10044 sw $s1, 0x44($sp)"], [4, "00a09021 move\ts2,a1", "00a08821 addu $s1, $a1, $zero"], [6, "afb10044 sw\ts1,68(sp)", "afb20048 sw $s2, 0x48($sp)"], [50, "3c110000 lui\ts1,0x0", "3c128012 lui $s2, %hi(D_80126940)"], [51, "26310000 addiu\ts1,s1,0", "26526940 addiu $s2, $s2, %lo(D_80126940)"], [54, "86230000 lh\tv1,0(s1)", "86430000 lh $v1, 0x0($s2)"], [74, "8605001a lh\ta1,26(s0)", "27a40010 addiu $a0, $sp, 0x10"], [75, "27a40010 addiu\ta0,sp,16", "00118c00 sll $s1, $s1, 16"], [76, "00b22821 addu\ta1,a1,s2", "8605001a lh $a1, 0x1A($s0)"], [78, "30a50fff andi\ta1,a1,0xfff", "00b12821 addu $a1, $a1, $s1"], [79, "86050018 lh\ta1,24(s0)", "0c004956 jal func_80012558"], [81, "27a40010 addiu\ta0,sp,16", "86050018 lh $a1, 0x18($s0)"], [82, "86020028 lh\tv0,40(s0)", "0c0049b1 jal func_800126C4"], [83, "86230000 lh\tv1,0(s1)", "27a40010 addiu $a0, $sp, 0x10"], [84, "00000000 nop", "86020028 lh $v0, 0x28($s0)"], [85, "00431021 addu\tv0,v0,v1", "86430000 lh $v1, 0x0($s2)"], [86, "afa20024 sw\tv0,36(sp)", "00000000 nop"], [87, "8602002a lh\tv0,42(s0)", "00431021 addu $v0, $v0, $v1"], [88, "3c030000 lui\tv1,0x0", "afa20024 sw $v0, 0x24($sp)"], [89, "84630000 lh\tv1,0(v1)", "8602002a lh $v0, 0x2A($s0)"], [90, "27a40010 addiu\ta0,sp,16", "3c038012 lui $v1, %hi(D_80126942)"], [91, "00431021 addu\tv0,v0,v1", "84636942 lh $v1, %lo(D_80126942)($v1)"], [92, "afa20028 sw\tv0,40(sp)", "27a40010 addiu $a0, $sp, 0x10"], [93, "8602002c lh\tv0,44(s0)", "00431021 addu $v0, $v0, $v1"]], "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:49:45", "addr": "0x80169228", "name": "func_80169228", "reach": 138, "klass": "struct", "nins": 105, "status": "failed", "closeness": null, "where_stuck": "none \u2014 MATCH (105 ins). Modeled on matched sibling DEFINE_func_80169A4C (engine_core.h):", "best_draft": ".run/backlog_drafts/func_80169228.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 19:50:19", "addr": "0x8012b4b8", "name": "func_8012B4B8", "reach": 138, "klass": "regalloc-order", "nins": 84, "status": "failed", "closeness": null, "where_stuck": "none \u2014 MATCH (84 ins)", "best_draft": ".run/backlog_drafts/func_8012B4B8.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 20:23:40", "addr": "0x80156670", "name": "func_80156670", "reach": 138, "klass": "regalloc-order", "nins": 83, "status": "failed", "closeness": null, "where_stuck": "none \u2014 MATCH (83 ins). param_2/param_3 as s32 (not u16) flips the $s5/$s6 tie-break", "best_draft": ".run/backlog_drafts/func_80156670.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 20:23:40", "addr": "0x80174cb0", "name": "func_80174CB0", "reach": 138, "klass": "regalloc-order", "nins": 123, "status": "failed", "closeness": null, "where_stuck": "none \u2014 MATCH (123 ins)", "best_draft": ".run/backlog_drafts/func_80174CB0.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 20:24:20", "addr": "0x80156670", "name": "func_80156670", "reach": 138, "klass": "regalloc-order", "nins": 83, "status": "failed", "closeness": null, "where_stuck": "none \u2014 MATCH (83 ins). param_2/param_3 as s32 (not u16) flips the $s5/$s6 tie-break", "best_draft": ".run/backlog_drafts/func_80156670.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 20:24:20", "addr": "0x80174cb0", "name": "func_80174CB0", "reach": 138, "klass": "regalloc-order", "nins": 123, "status": "failed", "closeness": null, "where_stuck": "none \u2014 MATCH (123 ins)", "best_draft": ".run/backlog_drafts/func_80174CB0.c", "binary": "ov_SC01_077", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 21:50:11", "addr": "0x8014D820", "name": "func_8014D820", "reach": 138, "klass": "schedule", "nins": 304, "status": "near-miss", "closeness": 9, "where_stuck": "SESSION-18: 25->9 (304/304, prologue byte-exact). Residual is ONE schedule permutation in idx 84-98 (pos/desc block): mine issues z0=ent->z at 87 and stores desc.x at 90 / pos.y at 98; target issues z0 at 91, stores pos.y at 89 / desc.x at 98. MEASURED FLOOR: all THREE permuter profiles flat from THIS seed (regalloc 10 cycles, schedule 8, cse 8). Reading exhausted: 11 source-shape attempts, and every arrangement moving the z0 load later costs +1 ins while the target does it free => the placement is scheduler-produced, not expressible in C. symcheck 12/12 clean. Banking pre-cleared: 32 local_type (T0, auto) + 3 data_decl (T0, reconcile_decls) + 1 self_decl_hdr = the SS30#2 macro-widen in engine_core.h => FLEET-SHARED T2, R22 MANDATORY. Cheap tiers are now genuinely exhausted => this is the justified Fable5 case (Drew's call).", "best_draft": ".run/giants/s18_func_8014D820_close9.c", "binary": null, "source": "ov_SC01_077", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 23:35:39", "addr": "0x8014d4c0", "name": "func_8014D4C0", "reach": 138, "klass": "schedule", "nins": 84, "status": "near", "closeness": 44, "where_stuck": "none \u2014 MATCH (goto forces the &&-body out of line; the success path as the", "best_draft": ".run/backlog_drafts/func_8014D4C0.c", "binary": "ov_SC07_006", "source": "t6-recover", "residual": [[18, "10400036 beqz\tv0,124 <func_8014D4C0+0x124>", "10400015 beqz $v0, .L8014D560"], [33, "10400007 beqz\tv0,a4 <func_8014D4C0+0xa4>", "10400009 beqz $v0, .L8014D56C"], [37, "10400023 beqz\tv0,124 <func_8014D4C0+0x124>", "10400002 beqz $v0, .L8014D560"], [40, "a2000074 sb\tzero,116(s0)", "ae200174 sw $zero, 0x174($s1)"], [41, "96220098 lhu\tv0,152(s1)", "0805357d j .L8014D5F4"], [42, "00000000 nop", "00001021 addu $v0, $zero, $zero"], [43, "a4e20000 sh\tv0,0(a3)", "96220098 lhu $v0, 0x98($s1)"], [44, "9622009a lhu\tv0,154(s1)", "00000000 nop"], [45, "00000000 nop", "a4e20000 sh $v0, 0x0($a3)"], [46, "2442fffd addiu\tv0,v0,-3", "9622009a lhu $v0, 0x9A($s1)"], [47, "a4e20002 sh\tv0,2(a3)", "00000000 nop"], [48, "9622009c lhu\tv0,156(s1)", "2442fffd addiu $v0, $v0, -0x3"], [49, "00000000 nop", "a4e20002 sh $v0, 0x2($a3)"], [50, "a4e20004 sh\tv0,4(a3)", "9622009c lhu $v0, 0x9C($s1)"], [51, "8e040020 lw\ta0,32(s0)", "00000000 nop"], [52, "8e050058 lw\ta1,88(s0)", "a4e20004 sh $v0, 0x4($a3)"], [54, "02403821 move\ta3,s2", "8e050058 lw $a1, 0x58($s0)"], [55, "10400010 beqz\tv0,120 <func_8014D4C0+0x120>", "0c04d693 jal func_80135A4C"], [56, "00000000 nop", "02403821 addu $a3, $s2, $zero"], [57, "96420000 lhu\tv0,0(s2)", "14400004 bnez $v0, .L8014D5B8"], [58, "00000000 nop", "00001021 addu $v0, $zero, $zero"], [59, "a6220006 sh\tv0,6(s1)", "a2000074 sb $zero, 0x74($s0)"], [60, "96420002 lhu\tv0,2(s2)", "0805357d j .L8014D5F4"], [61, "00000000 nop", "ae200174 sw $zero, 0x174($s1)"]], "passes_tried": null}
|
||||
{"ts": "2026-07-24 23:35:39", "addr": "0x80174cb0", "name": "func_80174CB0", "reach": 138, "klass": "regalloc-order", "nins": 123, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (pin &D_80126940 to $s2 via `register short* __asm__(\"$18\")` reproduces the address-CSE the natural 3-scalar form refuses; then t0,t1,t2,vx,vy,vz source order gives the target schedule)", "best_draft": ".run/backlog_drafts/func_80174CB0.c", "binary": "ov_SC07_006", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
{"ts": "2026-07-24 23:36:22", "addr": "0x8014d4c0", "name": "func_8014D4C0", "reach": 138, "klass": "schedule", "nins": 84, "status": "near", "closeness": 44, "where_stuck": "none \u2014 MATCH (goto forces the &&-body out of line; the success path as the", "best_draft": ".run/backlog_drafts/func_8014D4C0.c", "binary": "ov_SC07_006", "source": "t6-recover", "residual": [[18, "10400036 beqz\tv0,124 <func_8014D4C0+0x124>", "10400015 beqz $v0, .L8014D560"], [33, "10400007 beqz\tv0,a4 <func_8014D4C0+0xa4>", "10400009 beqz $v0, .L8014D56C"], [37, "10400023 beqz\tv0,124 <func_8014D4C0+0x124>", "10400002 beqz $v0, .L8014D560"], [40, "a2000074 sb\tzero,116(s0)", "ae200174 sw $zero, 0x174($s1)"], [41, "96220098 lhu\tv0,152(s1)", "0805357d j .L8014D5F4"], [42, "00000000 nop", "00001021 addu $v0, $zero, $zero"], [43, "a4e20000 sh\tv0,0(a3)", "96220098 lhu $v0, 0x98($s1)"], [44, "9622009a lhu\tv0,154(s1)", "00000000 nop"], [45, "00000000 nop", "a4e20000 sh $v0, 0x0($a3)"], [46, "2442fffd addiu\tv0,v0,-3", "9622009a lhu $v0, 0x9A($s1)"], [47, "a4e20002 sh\tv0,2(a3)", "00000000 nop"], [48, "9622009c lhu\tv0,156(s1)", "2442fffd addiu $v0, $v0, -0x3"], [49, "00000000 nop", "a4e20002 sh $v0, 0x2($a3)"], [50, "a4e20004 sh\tv0,4(a3)", "9622009c lhu $v0, 0x9C($s1)"], [51, "8e040020 lw\ta0,32(s0)", "00000000 nop"], [52, "8e050058 lw\ta1,88(s0)", "a4e20004 sh $v0, 0x4($a3)"], [54, "02403821 move\ta3,s2", "8e050058 lw $a1, 0x58($s0)"], [55, "10400010 beqz\tv0,120 <func_8014D4C0+0x120>", "0c04d693 jal func_80135A4C"], [56, "00000000 nop", "02403821 addu $a3, $s2, $zero"], [57, "96420000 lhu\tv0,0(s2)", "14400004 bnez $v0, .L8014D5B8"], [58, "00000000 nop", "00001021 addu $v0, $zero, $zero"], [59, "a6220006 sh\tv0,6(s1)", "a2000074 sb $zero, 0x74($s0)"], [60, "96420002 lhu\tv0,2(s2)", "0805357d j .L8014D5F4"], [61, "00000000 nop", "ae200174 sw $zero, 0x174($s1)"]], "passes_tried": null}
|
||||
{"ts": "2026-07-24 23:36:22", "addr": "0x80174cb0", "name": "func_80174CB0", "reach": 138, "klass": "regalloc-order", "nins": 123, "status": "near", "closeness": 0, "where_stuck": "none \u2014 MATCH (pin &D_80126940 to $s2 via `register short* __asm__(\"$18\")` reproduces the address-CSE the natural 3-scalar form refuses; then t0,t1,t2,vx,vy,vz source order gives the target schedule)", "best_draft": ".run/backlog_drafts/func_80174CB0.c", "binary": "ov_SC07_006", "source": "t6-recover", "residual": null, "passes_tried": null}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import re,subprocess,difflib,sys,collections
|
||||
OBJ=".run/drafts-behemoth2/work/func_8017D960/t.o"
|
||||
OBJDUMP="tools/bin/mips-linux-gnu-objdump"
|
||||
import shutil,os
|
||||
for c in ["mips-linux-gnu-objdump","mipsel-linux-gnu-objdump","mips-elf-objdump"]:
|
||||
if shutil.which(c): OBJDUMP=c;break
|
||||
out=subprocess.run([OBJDUMP,"-drz",OBJ],capture_output=True,text=True).stdout
|
||||
mine=[]
|
||||
for line in out.splitlines():
|
||||
m=re.match(r'\s*[0-9a-f]+:\s+[0-9a-f]{8}\s+(\S+)\s*(.*)',line)
|
||||
if m: mine.append((m.group(1),m.group(2).split(';')[0].strip()))
|
||||
tgt=[];cur=None
|
||||
for line in open("asm/ov_SC03_090/nonmatchings/ov_SC03_090_jr_8017CA80/func_8017D960.s"):
|
||||
s=line.strip()
|
||||
m=re.match(r'/\* \w+ ([0-9A-F]{8}) \w{8} \*/\s+(\S+)\s*(.*)',s)
|
||||
if m: tgt.append((m.group(2),m.group(3).strip()))
|
||||
NORM={'c2':'GTE','rtpt':'GTE','rtps':'GTE','nclip':'GTE','move':'addu','b':'j','nop':'nop','li':'addiu','beq':'beqz','bne':'bnez','negu':'subu'}
|
||||
def op(o): return NORM.get(o,o)
|
||||
a=[op(x[0]) for x in mine]; b=[op(x[0]) for x in tgt]
|
||||
print("mine",len(a),"target",len(b))
|
||||
sm=difflib.SequenceMatcher(None,a,b,autojunk=False)
|
||||
tot=0;blocks=[]
|
||||
for tag,i1,i2,j1,j2 in sm.get_opcodes():
|
||||
if tag=='equal': tot+=i2-i1
|
||||
else: blocks.append((tag,i1,i2,j1,j2))
|
||||
print("opcode-sequence LCS match: %d / %d target ins = %.1f%%"%(tot,len(b),100.0*tot/len(b)))
|
||||
print("num divergent hunks:",len(blocks))
|
||||
for tag,i1,i2,j1,j2 in blocks[:60]:
|
||||
print(f" {tag:8s} mine[{i1}:{i2}] ({i2-i1}) tgt[{j1}:{j2}] ({j2-j1}) tgt-ops={[x for x in b[j1:min(j2,j1+6)]]} mine-ops={[x for x in a[i1:min(i2,i1+6)]]}")
|
||||
print("... total hunks",len(blocks))
|
||||
@@ -0,0 +1,11 @@
|
||||
import re,sys
|
||||
F="asm/ov_SC03_090/nonmatchings/ov_SC03_090_jr_8017CA80/func_8017D960.s"
|
||||
ins=[];cur=None
|
||||
for line in open(F):
|
||||
s=line.strip()
|
||||
if s.startswith('.L') and s.endswith(':'): cur=s[:-1]; continue
|
||||
m=re.match(r'/\* \w+ ([0-9A-F]{8}) \w{8} \*/\s+(\S+)\s*(.*)',s)
|
||||
if m: ins.append((len(ins),m.group(1),m.group(2),m.group(3).strip(),cur)); cur=None
|
||||
a,b=int(sys.argv[1]),int(sys.argv[2])
|
||||
for i,ad,op,ar,l in ins[a:b]:
|
||||
print(f"{i:5d} {l or '':>12s} {op:9s} {ar}")
|
||||
@@ -0,0 +1,28 @@
|
||||
import re,sys,collections
|
||||
F="asm/ov_SC03_090/nonmatchings/ov_SC03_090_jr_8017CA80/func_8017D960.s"
|
||||
ins=[] # (idx, addr, op, args, label_before)
|
||||
lbl={}
|
||||
cur=None
|
||||
for line in open(F):
|
||||
m=re.match(r'\s*\.?(L[0-9A-F]+):',line.strip())
|
||||
if line.strip().endswith(':') and line.strip().startswith('.L'):
|
||||
cur=line.strip()[:-1]; continue
|
||||
m=re.match(r'\s*/\* \w+ ([0-9A-F]{8}) \w{8} \*/\s+(\S+)\s*(.*)',line)
|
||||
if m:
|
||||
ins.append([len(ins),m.group(1),m.group2 if False else m.group(2),m.group(3).strip(),cur])
|
||||
if cur: lbl[cur]=len(ins)-1
|
||||
cur=None
|
||||
# branch edges
|
||||
back=[];fwd=[]
|
||||
addr2i={x[1]:x[0] for x in ins}
|
||||
for i,a,op,args,l in ins:
|
||||
m=re.search(r'\.(L[0-9A-F]{8})',args)
|
||||
if m and op in ('j','beqz','bnez','bgez','blez','bgtz','bltz','beq','bne','b'):
|
||||
t=lbl.get('.'+m.group(1))
|
||||
if t is None: continue
|
||||
if t<i: back.append((i,t,op))
|
||||
else: fwd.append((i,t,op))
|
||||
print("total ins",len(ins))
|
||||
print("=== BACK EDGES (loops) ===")
|
||||
for i,t,op in back:
|
||||
print(f" ins {t:5d} (0x{ins[t][1]}) <- {i:5d} (0x{ins[i][1]}) {op} bodylen={i-t}")
|
||||
@@ -0,0 +1,14 @@
|
||||
import re
|
||||
F="asm/ov_SC03_090/nonmatchings/ov_SC03_090_jr_8017CA80/func_8017D960.s"
|
||||
ins=[];cur=None;lbl={}
|
||||
for line in open(F):
|
||||
s=line.strip()
|
||||
if s.startswith('.L') and s.endswith(':'): cur=s[:-1]; continue
|
||||
m=re.match(r'/\* \w+ ([0-9A-F]{8}) \w{8} \*/\s+(\S+)\s*(.*)',s)
|
||||
if m:
|
||||
ins.append((len(ins),m.group(1),m.group(2),m.group(3).strip(),cur))
|
||||
if cur: lbl[cur]=len(ins)-1
|
||||
cur=None
|
||||
KEY=('rtpt','rtps','nclip','cfc2','mfc2','jal','mult','slti','jr')
|
||||
for i,a,op,ar,l in ins:
|
||||
if op in KEY or (op in('swc2','lwc2')): print(f"{i:5d} 0x{a} {op:8s} {ar}")
|
||||
@@ -0,0 +1,31 @@
|
||||
import re,subprocess,difflib,shutil,sys
|
||||
exec(open('.run/g2_mask.py').read().split('a=[mask(x)')[0])
|
||||
wm=words_mine(); wt=words_tgt()
|
||||
def full(x):
|
||||
rel=isinstance(x,tuple); v=x[1] if rel else x
|
||||
op=(v>>26)&0x3F
|
||||
if rel: return (v & 0xFFFF0000,'R')
|
||||
if op in (2,3): return (op<<26,'')
|
||||
if op in (1,4,5,6,7): return (v & 0xFFFF0000,'')
|
||||
return (v,'')
|
||||
a=[full(x) for x in wm]; b=[full(x) for x in wt]
|
||||
sm=difflib.SequenceMatcher(None,a,b,autojunk=False); ops=sm.get_opcodes()
|
||||
mt=[];_o=subprocess.run([OD,"-drz",OBJ],capture_output=True,text=True).stdout
|
||||
for line in _o.splitlines():
|
||||
m=re.match(r'\s*[0-9a-f]+:\s+[0-9a-f]{8}\s+(.*)',line)
|
||||
if m: mt.append(re.sub(r'\s+',' ',m.group(1).strip()))
|
||||
tt=[]
|
||||
for line in open("asm/ov_SC03_090/nonmatchings/ov_SC03_090_jr_8017CA80/func_8017D960.s"):
|
||||
m=re.match(r'\s*/\* \w+ [0-9A-F]{8} [0-9A-F]{8} \*/\s+(.*)',line)
|
||||
if m: tt.append(re.sub(r'\s+',' ',m.group(1).strip()))
|
||||
lo,hi=int(sys.argv[1]),int(sys.argv[2])
|
||||
for t,i1,i2,j1,j2 in ops:
|
||||
if j2<lo or j1>hi: continue
|
||||
for k in range(max(i1,i1),i2) if False else []: pass
|
||||
n=max(i2-i1,j2-j1)
|
||||
for k in range(n):
|
||||
mi=mt[i1+k] if i1+k<i2 else ''
|
||||
ti=tt[j1+k] if j1+k<j2 else ''
|
||||
mark=' ' if t=='equal' else '*'
|
||||
if t=='equal' and not (lo<=j1+k<=hi): continue
|
||||
print(f"{mark}{j1+k:5d} | {ti:42s} | {mi}")
|
||||
+1641
-1642
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user