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.
tst r0 blt label cmp r0, #11 bgt label
据我了解,如果 r0 < 0 或 r0 > 11,这种代码和平是一个障碍。
如何将其优化为仅 2 笔代码。
尝试无符号比较:
cmp r0, #11 bhi label
低于 0 的值使用二进制补码表示。因此,表示为 16 位无符号值的 -1 为 1111111111111111,高于 11(即 0000000000001011)。