ARM base instruction -- sbfiz

Signed Bitfield Insert in Zeros copies a bitfield of <width> bits from the least significant bits of the source register to bit position <lsb> of the destination register, setting the destination bits below the bitfield to zero, and the bits above the bitfield to a copy of the most significant bit of the bitfield.

带符号的位字段零插入将<width>位的位字段从源寄存器的最低有效位复制到目标寄存器的<lsb>位位置,将位字段下方的目标位设置为零,并将位字段上方的位设置为位字段最高有效位的副本。

32-bit variant
    SBFIZ <Wd>, <Wn>, #<lsb>, #<width>

    is equivalent to
    SBFM <Wd>, <Wn>, #(-<lsb> MOD 32), #(<width>-1)

64-bit variant
    SBFIZ <Xd>, <Xn>, #<lsb>, #<width>

    is equivalent to
    SBFM <Xd>, <Xn>, #(-<lsb> MOD 64), #(<width>-1)

  40380c:    937d7f80     sbfiz    x0, x28, #3, #32    // x28=1, x0=1<<3=8
  403810:    97fff8dc     bl    401b80 <malloc@plt>     // malloc(x0)
  403814:    f9002660     str    x0, [x19, #72]          // this->argv=malloc
  403818:    aa0003fb     mov    x27, x0
  40381c:    b4000b20     cbz    x0, 403980 <ferror@plt+0x1aa0>  // exit(1)
        if (!(this->argv = malloc(sizeof(char *) * this->argc))) {
            // cbz 403980
            perror("malloc");
            exit(1);
        }


=> 0x000000000040380c:  80 7f 7d 93     sbfiz   x0, x28, #3, #32
1: $sp = (void *) 0x7fffffb190
(gdb) p/x $x0
$65 = 0xc
(gdb) p/x $x28
$66 = 0x1
(gdb) n
0x0000000000403810 in ?? ()
=> 0x0000000000403810:  dc f8 ff 97     bl      0x401b80 <malloc@plt>
1: $sp = (void *) 0x7fffffb190
(gdb) p/x $x0
$67 = 0x8
(gdb) p/x $x28
$68 = 0x1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值