This is correct if and only if read the register clears a flag, and you need to test the state of that flag.
In most cases, this is not an issue.
Even if the BSET instruction was not used, there would have to be a read of a register or memory location if a bit was to be set without changing the state of the other bits, C bitfields are not a special case.
If there was not a BSET instruction, and we are not use using C bitfields this:
*x |= 4;
Would still generate a read modify cycle of some sort, even if it was to load a register, or the bit in and save it back.
How is it possible to set a bit with out first reading the rest of the byte?
Are proposing an new kind of memory that is bit addressable - because in this architecture io registers appear as memory.
In those few special cases, the user needs to know read the register first. It really does not matter how you do it, there will still be a read.
Message Edited by JimDon on
2008-04-21 08:29 AM