mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-04 13:07:32 +00:00
The APS5_DUMP_IR dump showed every scalar load's immediate offset as 0. An SMEM load keeps its immediate in the instruction's memory metadata: MemoryFlags indexes Resources().memoryInfo, whose offset holds the immediate plus 4 per component, while the soffset argument is the constant 0 when the instruction has none. Buffer, address and shared memory instructions keep their offsets there too. ProgramToString printed the arguments, the type and the use count, but not the flags or the metadata, so a dump could not tell 0x54 from 0x6c. ProgramToString now appends " [pc=0x... off=0x...]" to every instruction that carries memory metadata, and " [pc=0x... mem=?]" when its index is past memoryInfo, since dumps run before validation. The opcode set is one predicate, carriesMemoryInfo, which ValidateProgram now also uses for its memory-info index check; the validator accepts and rejects the same programs with the same messages. https://github.com/boykopovar/AnyPS5/pull/9633#issuecomment-6349729587 Related: #9749.