aboutsummaryrefslogtreecommitdiffhomepage
path: root/x86_64
Commit message (Collapse)AuthorAgeFilesLines
* various relocation related optimization lemon2025-12-141-16/+29
| | | | | | | | | | With 59ca5a8db, querying if a symbol is defined is cheap. If we're compiling code that calls foo() and we defined foo() in this compilation unit, we already know its offset within the .text section, so use it instead of emitting a relocation for the linker to handle. Also, put small literal data in the .text section instead of .rodata. This seems to improve performance (cache locality?), and as a bonus, it will be good for aarch64's instr encoding with smallish PC-relative offsets.
* fix position independent loads of function symbols. lemon2025-12-132-7/+9
| | | | | | | | For `extern int x[1];`, can use PCREL32 for &x. But for `extern int x(int)`, must use GOTREL, when not being called directly (that's PLT). Therefore the type of an external symbol (actually just whether it denotes a function) matters when deciding what kind of relocation to emit, so keep that information.
* x86-64/emit errata lemon2025-12-121-7/+4
|
* x86_64: fix erroneous encoding of index reg in no-pie situations lemon2025-12-121-11/+1
|
* s/amd64/x86_64/ lemon2025-12-124-0/+2379