Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法对 ARM7 中两个寄存器中的位执行按位 NAND 操作,无论是使用现有的 AND、OR 和 EOR 操作还是其他指令?
and然后mvn(不动)。
and
mvn
来自GCC 浏览器
int nand(int a, int b) { return ~(a & b); } nand(int, int): and r0, r0, r1 mvn r0, r0 bx lr
当然; AND 两个寄存器,然后将结果与全 1 进行 EOR(用于否定)。