On Tue, Sep 26, 2023 at 9:10 PM j2gg0s <feys1...@gmail.com> wrote:
>
> Already read it, I actually started here.
>
> What I can't understand is x64 rip-relative address.
>
> leaq    132795(%rip), %rcx      # 0x49b4e8 <go:func.*+0x220>
>
> why 132795, and what is loaded into rcx

It's a reference to another address in the program.  The comment from
the disassembler tells you that it refers to the address go:func.* +
0x220.  The linker constructs the offset 132795.

Ian



> 在2023年9月27日星期三 UTC+8 09:38:17<Ian Lance Taylor> 写道:
>>
>> On Tue, Sep 26, 2023 at 7:43 AM j2gg0s <feys...@gmail.com> wrote:
>> >
>> > How to understand assmbly code ` 47ae26: 48 8d 0d bb 06 02 00 leaq 
>> > 132795(%rip), %rcx # 0x49b4e8 <go:func.*+0x220>`
>>
>> The best place to start is
>>
>> https://go.googlesource.com/proposal/+/refs/heads/master/design/34481-opencoded-defers.md
>>
>> Ian
>
> --
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/69d8ca43-d4e7-4945-ab94-9951fa51188dn%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXCEBHWBXsXEQJnrXZZOe5DRmLZKDsY2tZBE_J56dzjzw%40mail.gmail.com.

Reply via email to