neobrain / nihstro

3DS shader assembler and disassembler
BSD 3-Clause "New" or "Revised" License
83 stars 35 forks source link

Check if input operands may simultaneously be used as output operands #37

Open neobrain opened 9 years ago

neobrain commented 9 years ago

It sounds likely that hardware does not actually support this. A hardware test should be written to verify that it doesn't, and a diagnostic should be added to make sure source code doesn't try to do this.

Example of what I'm talking about: add r4, i0, r4. Note that r4 is used both as an input and an output of the addition.

machinamentum commented 9 years ago

Caelina's shaders actually use the form add r4, r1, r4 quite a lot. Is there documentation suggesting that the hardware may not be supporting this?

neobrain commented 9 years ago

Hmm interesting. There is no specific documentation which suggested this, it's just something which sounded reasonable.