汇编

2019-07-23  本文已影响0人  下雨之後

汇编分析内联优化

var number = 10
func test(_ num: inout Int) {
    num = 20
}
test(&number)

leaq 0x12a(%rip), %rdi leaq是地址传递指令,callq的函数参数,%rip %rdi是寄存器
callq 0x100000f60 callq是函数调用指令,0x100000f60函数地址
movq $0x14, (%rdi) movq是值传递指令,$0x14是20

上一篇 下一篇

猜你喜欢

热点阅读