汇编

汇编分析内联优化

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

你可能感兴趣的:(汇编)