can the BRK instruction be conditionalized?
ersmith
Posts: 6,068
I've had reports of weird behavior of DEBUG statements in flexprop, and digging into it the offending DEBUGs all seem to have conditional BRK statements. That is,
if_e brk #2
doesn't work properly: it seems to always be triggered, but with an incorrect or corrupted immediate value. However,
if_ne jmp #L_tmp brk #2 L_tmp
does work as expected.
@cgracey is there something in the hardware, or perhaps in the debug stub, that would not like conditional BRK?
Comments
[deleted]
That is peculiar behaviour ... but I do see it is documented in the silicon doc:
Can't think why Chip did it that way though.
Quoting what I said on GitHub:
Oh, I guess that improves pipeline reload times, especially in cogexec.
EDIT: Hmm, not sure it'll help speed wise given debug code is always hubexec. [scratches head]
@ersmith , would you want to make the assembler emit a warning when it sees a conditional on a
brk
instruction?Yes, that's a good idea. I've checked in that change.