Why does this MOVSS instruction use RIP-relative addressing? [duplicate]
问题 This question already has an answer here : Why is the address of static variables relative to the Instruction Pointer? (1 answer) Closed last year . I found the following assembly code in disassembler (floating point logic c++). 842: movss 0x21a(%rip),%xmm0 I understand that when process rip will allways be 842 and this 0x21a(%rip) will be const. It seems a little odd to use this register. I want to know is there any advantage of using rip relative address, instead other addressing. 回答1: RIP