More like "NOT USING", eh? :)

 

Seriously, l like it and would use it. I'd prefer it not be tied to USING
because there are other reasons to not use a register (I think; can't come
up with any offhand, but I feel like there are?). Maybe:

PROTECT Rx

 

For extra credit:

     PROTECT Rx,'In use by xyzzy'

.the bit in the quotes would be echoed on a violation, so it's clear:

     Protected register violation: Rx

     Reason: In use by xyzzy

 

Would also be good if there were a directive for "implied register use".
Then macros whose caller changes a register could insert those, further
reducing surprises. IOW, if SVC 400 [yes, I know it's a one-byte value] is
going to change R2, a macro that invokes that SVC could include such a
directive, and if a PROTECT were in effect for R2, it would trigger.

Reply via email to