3 ms·
AND with 0xefffffff would become BIC ("bit clear", aka "and not") with 0x10000000. But yes, the basic idea of your comment is correct. Fortunately, compilers
by stephencanon 13y ago
AND with 0xefffffff would become BIC ("bit clear", aka "and not") with 0x10000000. But yes, the basic idea of your comment is correct. Fortunately, compilers are quite good at this sort of thing.
- cnvogel 13y agoAnd if you need something like ~(byte << N) for any purpose there's still MVN (move-not). MVN r0, #0x10000000 ; ro = 0xefffffff Oh, the joy :-).
- stephencanon 13y agoCMN is the real gem. It's an endless source of bugs in the time between when compiler writers discover it and when they figure out how it actually sets flags. ARM would have done well to provide a "here's how you actually use this instruction" guide in the architecture reference manual.