SETR naming
Cluso99
Posts: 18,069
in Propeller 2
Was there any reason to use SETR rather than SETI since it actually modifies the instruction bits, not the result bits ???
BTW I still don't think there was any reason to change SETS/SETD/SETR from MOVS/MOVD/MOVI.
BTW I still don't think there was any reason to change SETS/SETD/SETR from MOVS/MOVD/MOVI.
Comments
setr creates basically a 3 operant instruction
setr r3
add r2, r1
leaves r2 unchanged and r3 is r2+r1
or something alike this.
Mike
SETR is the same as MOVI on P1. Its in the same family as SETS and SETD (MOVS and MOVD on P1).
They physically change the register bits typically in an instruction. Must be done with at least 2 more instructions following before the “changed” instruction is executed.
I kind of like the change, because of the pipeline timing changes -- it makes it clear that when porting code you have to watch out for leaving enough time for self modifying code to work correctly.
Yes, I have found that the ALTx instructions work nicely when re-writing P1 code removing most needs for SETx instructions. There are still cases where it's nicer tho. eg changing rd/wr-byte/word/long instructions
But if you are just converting code to run then the SETx instructions are easiest. And yes the extra instruction needed between the modification is a trap.