AUGS not cancelling after a ALTD instruction
ozpropdev
Posts: 2,792
Hi Chip
I know it's a too late now but I discovered this bug this morning.
When I try to AUGS a ALTD instruction the AUG is not being cancelled afte the AUTD.
For example
A simple fix is to use a register instead of a immediate.
BTW. The increment\decrement option for ALTD/ALTS needs to be added to the documentation.
Cheers
Brian
I know it's a too late now but I discovered this bug this morning.
When I try to AUGS a ALTD instruction the AUG is not being cancelled afte the AUTD.
For example
mov pa,#myreg altd pa,##1 << 9 'alter D in next instruction,increment pa mov 0-0,#$55 'returns $255 not $55 **** altd pa,##1 << 9 'alter D in next instruction,increment pa mov 0-0,#$aa 'returns $2aa not $aa ****
A simple fix is to use a register instead of a immediate.
mov pa,#myreg altd pa,autoinc 'alter D in next instruction,increment pa mov 0-0,#$55 'returns $55 Ok altd pa,autoinc ''alter D in next instruction,increment pa mov 0-0,#$aa 'returns $aa Ok . . autoinc long 1 << 9
BTW. The increment\decrement option for ALTD/ALTS needs to be added to the documentation.
Cheers
Brian
Comments
Not that I've tried to reason it completely.
http://forums.parallax.com/discussion/169585/xoro32-scrambler-output#latest
This needs to be documented, but I don't count it as a bug, because if we used up the AUGx on the ALTx instruction, the instruction being modified by the ALTx couldn't have an augmented constant. I figured the ALTx instructions would be best served by registers containing any needed large constants.
ALTx instructions affect the very next instruction in the pipeline through mux's. It would take a bunch of flops and more mux's to hold those states for later.