PC relative load/store in LLVM Target?

Hello,

Is there any exist LLVM Target (backend) that support PC relative load and store? If so, what exactly is the instruction?

Thanks

Hi,

Is there any exist LLVM Target (backend) that support PC relative load and store? If so, what exactly is the instruction?

It's pretty common, with diverse uses too (direct/GOT/jump-table
spring to mind). You'll see it in x86 (mov in
https://godbolt.org/z/qZwSS5), AArch64 (ldr in
https://godbolt.org/z/BThYU7) and I'm sure many others.

What do you really want to know about the usage and/or instruction?

Cheers.

Tim.

Hello Tim,

Thanks for your reply. Sorry about that I was not explain my question clearly in previous email. I am looking for a target that has both pc-relative load and store and use them for constant pool[1], function pointer[2], {global|static} variable and pointer access[3][4][5]. I am wondering how do they handle different cases in backend. Do you have any target in mind that I should look into?

Thanks,
Yi-Hong