How can i write following: movq variable@GOTPCREL(%rip), %r8
in GAS Intel syntax?
.intel_syntax noprefix
allows only this: mov r8, variable@GOTPCREL
, it does not understand ()
, and resulting code is different - i receive segmentation fault. How can i specify RIP-relative addressing?
At this moment i have to use following syntax switcher:
.att_syntax
movq variable@GOTPCREL(%rip), %r8
.intel_syntax noprefix
I prefer Intel syntax, and my code uses it mostly. This switcher is inconvenience when porting code to GAS. Is it possible to write it shortly in Intel syntax?
mov r8, variable@GOTPCREL[rip]
- it works good. Thank you very much. – Imperative