aboutsummaryrefslogtreecommitdiffhomepage
path: root/x86_64
Commit message (Collapse)AuthorAgeFilesLines
* ir: make address ref hash table resizable lemon2026-02-282-4/+4
| | | | Would hit the limit on very large functions (thanks csmith).
* backend: fix edgecases where imm32 immediate overflows lemon2026-02-281-3/+9
|
* fix various warnings lemon2026-02-241-1/+0
|
* x86_64/isel: fix regression with cmp instrs edge case lemon2026-02-241-1/+1
|
* driver: recognize shared libraries; & backend: misc fixes for PIC isel edgecases lemon2026-02-222-5/+7
|
* IR: just use an array for extended constants lemon2026-02-192-15/+15
| | | | | The extra work of using a hashtable to intern them is probably unnecessary.
* ir: regalloc & x86-64 isel bugfixes lemon2026-02-181-4/+18
|
* x86_64/isel: fix edgecase of fixarg from seljmp derefing nullpointer lemon2026-01-091-1/+1
|
* codegen: eliminate redudant consecutive ret sequences lemon2026-01-081-0/+2
|
* backend: separate instrs for integer/float store lemon2025-12-313-15/+15
|
* x86_64: optimize away some redundant zero extensions lemon2025-12-291-1/+9
|
* x86_64/isel: aimm should take vlong lemon2025-12-291-1/+1
|
* backend: start implementing aarch64 lemon2025-12-281-14/+2
|
* x86_64/emit move things around lemon2025-12-261-12/+11
|
* avoid GOT relocations in unnecessary instances lemon2025-12-252-8/+6
| | | | | Also change xcon to have a flagset for symbols (whether it's a function, locally defined; later: thread local, etc).
* x86_64: fix isel for 7036e19 lemon2025-12-241-1/+1
|
* x86_64: fix -fpic lemon2025-12-231-9/+7
|
* lower alloca as a separate pass before isel lemon2025-12-232-33/+13
|
* isel: fix returning fixarg()'d temp lemon2025-12-201-4/+4
|
* backend: unify pass memory allocation strategies lemon2025-12-202-7/+2
| | | | | | It was all over the place for temporary data structures used by individual passes. Now there is an arena specifically for that, which is nicer.
* emit: fix errata in flagslivep() lemon2025-12-201-1/+1
| | | | This little typo inhibited a small optimization. Oops
* x86-64: peephole optimization for 3-address shift -> lea lemon2025-12-202-1/+15
|
* isel: fix wrong instr cls being used in some cases lemon2025-12-191-2/+2
| | | | Specifically comparisons where operation cls != result cls
* x86-64 abi: fix wrong class being used in float vararg lemon2025-12-181-1/+1
|
* x86-64/emit: remove some superfluous rex.W prefixes lemon2025-12-181-2/+2
|
* regalloc+emit: get rid of xsave/xrestore hack lemon2025-12-181-6/+0
| | | | | | | Was used for situation where we needed to spill more than 1 temporary and have to use a register that is already used. Instead of push/pop, we can just allocate and set aside specific stack slots for this purpose. Also, reworked linearscan() interval sets to separate FPR/GPR intervals.
* x86_64: for vararg calls, write to EAX in isel lemon2025-12-182-14/+5
| | | | Also, in regalloc ensure fixed intervals are sorted
* emit: don't put the exit block always at the end of the function lemon2025-12-171-1/+6
|
* x86-64/emit: implement single-exit-point ret with jump threading lemon2025-12-161-25/+37
|
* create distinct interned string type lemon2025-12-151-3/+3
| | | | | | | | | | | | | | Interned strings are used pervasively, so it's a good idea to add a layer of type safety to differentiate them from general cstrs and avoid potential bugs from comparing non-interned and interned strings. Not that that's happened so far that I can remember, but it could. I'm 90% sure it's legal to alias `struct {char c;}` pointers with `char` pointers. This specific typedef gives type safety but with a simple one-way `internstr -> const char *` typecast (with `&istr->c`). Converting the other way around is more intentional: a straight up cast `(internstr)cstr` which sticks out as unchecked and probably wrong, or calling the intern(cstr) function, which is the right way.
* x86_64/emit: handle pseudo subtraction used for cmp lemon2025-12-141-0/+2
| | | | Isel had this forever, but the matching code for it in emit wasn't there
* 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