decomp-toolkit icon indicating copy to clipboard operation
decomp-toolkit copied to clipboard

Handle `lbzx` relocations

Open encounter opened this issue 1 year ago • 0 comments
trafficstars

dtk fails to detect a relocation in GetMesMaxSizeSub in mario party 4.

 /* 800473F0 00044250  88 7F 00 00 */    lbz r3, 0x0(r31)
 /* 800473F4 00044254  38 63 89 A9 */    subi r3, r3, 0x7657
 /* 800473F8 00044258  7F A3 68 AE */    lbzx r29, r3, r13

the relevant code is this. 0x7657 points to mesWInsert-0x1 which is equivalent to winTabSize this code translates to

var_r29 = mesWInsert[*var_r31 - 1];

encounter avatar Jan 24 '24 06:01 encounter