3 ms·
It's a global variable, it's not on the stack. It's in the data section. $arr is copying the address of "arr", so it must use an immediate move (possibly 64-bi
by bonzini 9y ago
It's a global variable, it's not on the stack. It's in the data section.
$arr is copying the address of "arr", so it must use an immediate move (possibly 64-bit). It could also use RIP-relative with the "lea" (load effective address) instruction.
$ptr(%rip) is accessing memory, so it uses RIP-relative addressing with the "mov" instruction.
- magnetic 9y ago> It's a global variable, it's not on the stack. It's in the data section. And because it's a const, it's in the .rodata section... (read-only) Playing too liberally with the data often leads to a SEGV (as it should).