aboutsummaryrefslogtreecommitdiffhomepage
path: root/amd64
Commit message (Collapse)AuthorAgeFilesLines
* emit: turn ADD -imm into SUB immlemon2025-12-121-1/+5
|
* isel: fix bug where sub turned into add, but inplace didn't reflectlemon2025-12-121-2/+2
|
* amd64/emit: change instr desc table a littlelemon2025-12-121-157/+158
|
* rename arraylength macro -> countoflemon2025-12-113-12/+12
|
* parallel move; implement reg<->stack swplemon2025-12-101-2/+3
|
* misc fixeslemon2025-12-101-3/+2
|
* amd64: fix wrong condition code being used for float gthlemon2025-12-071-1/+1
| | | | ughh
* amd64: use XORPS for floating point negationlemon2025-12-072-3/+7
| | | | | | | | | | Previously `neg x` was being turned into `sub 0, x`. But this gives the wrong result for zero/negative zero (-0.0 == -0.0 but 0.0 - 0.0 == 0.0), so it wasn't IEEE compliant or correct. Do what every other compiler does instead and flip the sign bit with an exclusive or. Should implement someway of deduplicating small data constants like the ones used here though.
* abi: fix aggregate passed by regs 2nd reg offsetlemon2025-12-061-3/+7
| | | | | | | | | It was broken for example `struct { i32 a; f64 b; }` (would try to load/store b from byte offset 4, not 8). Introduce r2off, realize in x86-64 it's always 8; even `struct {i32 a; f32 b;}` gets passed in one (integer) register. But not so in (future) ABIs like RISC-V, I believe there `{i32, f32}` would get passed in 1 integer and 1 float register (r2off = 4).
* add command-line predefined macros (-D, -U)lemon2025-12-061-1/+0
|
* amd64: fix pseudo-push/pop float reglemon2025-12-051-2/+2
| | | | | | With add/sub flags can be trashed which can result in miscompilations, use lea. This shouldn't even exist, need to get rid of xsave/xrestore, but for now fix this kludge
* isel: fix flipped sub not being inplacelemon2025-12-051-0/+1
|
* amd64: handle unoredered float cmpslemon2025-12-051-2/+30
|
* isel: fix immediate of flipped sublemon2025-12-041-0/+1
|
* test/11-abilemon2025-12-021-6/+9
|
* amd64/isel: fix addressing index shift being possibly too large to encode (duh)lemon2025-11-292-1/+2
|
* isel: fix branch arglemon2025-11-271-0/+2
|
* abi/isel: aggregate args in stack wiplemon2025-11-271-6/+11
|
* amd64/emit: I64 consts and fp push/poplemon2025-11-241-7/+22
|
* fix regression w/ store instr + memory immediatelemon2025-11-241-11/+13
|
* isel: loadstoreaddr don't fuseaddr as muchlemon2025-11-241-3/+5
|
* amd64/emit: fix (partially) float comparisonsdlemon2025-11-231-6/+10
|
* amd64: va_arg for small aggregateslemon2025-11-231-2/+8
|
* amd64/emit: this rbpoff approach is kinda broken..lemon2025-11-231-1/+1
|
* implement float varargs, and some other fixeslemon2025-11-232-46/+51
|
* amd64/isel: indirect call arg must be memaddrlemon2025-11-221-2/+7
|
* make sure indirect function call pointer does not end up in clobber reglemon2025-11-221-0/+5
|
* sysv: nested scalar classification of struct shouldn't return KPTR, used to ↵lemon2025-11-221-1/+1
| | | | indicate aggregate in the stack
* amd64/emit: fix REX-requiring 8-bit GPR encoding checking wrong reglemon2025-11-221-2/+2
|
* ir: barebones IR passes checked contractslemon2025-11-211-0/+2
|
* remove umullemon2025-11-212-4/+2
|
* change op names to match 285063eba44lemon2025-11-213-48/+48
|
* rename IR classes to reflect bitsizelemon2025-11-213-47/+47
|
* isel: lower allocas a different way, such that stk address gets materialized ↵lemon2025-11-202-27/+62
| | | | when necesary
* ir: for easier debugging, keep ctype in dats, print as literal when possiblelemon2025-11-201-3/+7
|
* debug output to stdoutlemon2025-11-191-1/+1
|
* ir: 'trap' jump; c: __builtin_trap; lex: __has_builtinlemon2025-11-151-0/+2
|
* isel: don't incorrectly clamp constant lhs of shift operationlemon2025-11-151-4/+4
|
* emit: stack alignment edgecaseslemon2025-11-151-5/+9
|
* isel: fold arithlemon2025-11-141-1/+21
|
* sysv: document vaargs stack layout stufflemon2025-11-141-3/+29
|
* preeliminary va_list supportlemon2025-11-143-11/+186
|
* amd64/isel: fold Oext with immediateslemon2025-11-121-0/+8
|
* implement argument passing in stacklemon2025-11-121-6/+18
|
* amd64: fix positive RBP off (stack params); address encoding erratalemon2025-11-121-2/+2
|
* fixup! amd64: get rid of xinc/xdec. handle those at emit stagelemon2025-11-091-1/+1
|
* amd64/isel: make `sub imm` work for address fusinglemon2025-11-091-2/+8
|
* amd64: get rid of xinc/xdec. handle those at emit stagelemon2025-11-092-26/+7
|
* amd64: errata with unsigned greater than or equal (should be JAE)lemon2025-11-061-1/+1
|
* amd64: fix aggregate abi stuff;; ir: fold, peephole optimizing constructorslemon2025-11-052-19/+28
|