ARM base instruction -- bic

Bitwise Bit Clear (shifted register) performs a bitwise AND of a register value and the complement of an optionally-shifted register value, and writes the result to the destination register.


位清除(移位寄存器)执行寄存器值与可选移位寄存器值的补码的位与,并将结果写入目标寄存器。


32-bit variant
    Applies when sf == 0.
    BIC <Wd>, <Wn>, <Wm>{, <shift> #<amount>}

64-bit variant
    Applies when sf == 1.
    BIC <Xd>, <Xn>, <Xm>{, <shift> #<amount>}


Operation
 bits(datasize) operand1 = X[n];
 bits(datasize) operand2 = ShiftReg(m, shift_type, shift_amount);
 
 operand2 = NOT(operand2);
 
 result = operand1 AND operand2;
 X[d] = result;


bic r0, r0, #%1011 // 清除 r0 中的位 0, 1, 3, 其余的位保持不变.


  40ba58:    78606822     ldrh    w2, [x1, x0]
  40ba5c:    d2750042     eor    x2, x2, #0x800
  40ba60:    530b2c42     ubfx    w2, w2, #11, #1
  40ba64:    0a230043     bic    w3, w2, w3

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值