aboutsummaryrefslogtreecommitdiff
path: root/src/arch
AgeCommit message (Collapse)Author
2023-11-03x86_64: reduce `RegisterManager` performance regressionJacob Young
This reduces the regression from 0.11.0 by 95%. Closes #17678
2023-11-03x86_64: fix std test failuresJacob Young
2023-11-01wasm: fix bitcasting to -and from arraysLuuk de Gram
Arrays are currently always passed by reference, this means that we always keep the value in linear memory and never load it to Wasm's stack. Scalar values however do get lowered to Wasm's stack. This means when bitcasting from an array to a scalar value, we must load the memory of the array as such scalar type. To bitcast a scalar type to an array, we allocate a new temporary in the linear data segment, and then store the scalar value there.
2023-10-31std.builtin.Endian: make the tags lower caseAndrew Kelley
Let's take this breaking change opportunity to fix the style of this enum.
2023-10-31mem: fix ub in writeIntJacob Young
Use inline to vastly simplify the exposed API. This allows a comptime-known endian parameter to be propogated, making extra functions for a specific endianness completely unnecessary.
2023-10-30elf: move incremental codegen bits into ZigObject.zigJakub Konka
2023-10-30elf: rename ZigModule to ZigObjectJakub Konka
2023-10-30coff: implement enough of extern handling to pass comptime export testsJakub Konka
2023-10-30macho: implement enough of extern handling to pass comptime export testsJakub Konka
2023-10-29x86_64: fix compiler rt test failuresJacob Young
2023-10-29x86_64: refactor codegen memory reprJacob Young
Also refactor linker reloc lowering.
2023-10-29x86_64: fix hazard between pic call and sysv ccJacob Young
2023-10-28x86_64: handle .load_symbol in more placesJacob Young
2023-10-28x86_64: handle .load_symbol in mul_with_overflow and mul_divJakub Konka
2023-10-28x86_64: assert fixes are ._ for linker_relocJakub Konka
2023-10-28x86_64: refactor Lower.zigJakub Konka
2023-10-28x86_64: pass behavior tests PIC and non-PICJakub Konka
2023-10-28x86_64: no more load/lea_symbol weirdnessJakub Konka
2023-10-28elf: set needs_got on generated extern varsJakub Konka
2023-10-28x86_64: rename load/lea_memory to load/lea_symbolJakub Konka
2023-10-28x86_64: do not hardcode memory passed by Elf linkerJakub Konka
2023-10-27x86_64: fix c abi test failuresJacob Young
2023-10-27x86_64: fix `cond_br`Jacob Young
2023-10-27x86_64: fix `@memset`Jacob Young
2023-10-27x86_64: add missing spillJacob Young
2023-10-26x86_64: add missing spillsJacob Young
2023-10-26x86_64: fix behavior of `getValue`Jacob Young
Old behavior renamed to `getValueIfFree`.
2023-10-26x86_64: implement `@divFloor` and `@mod` for `i128`Jacob Young
2023-10-25x86_64: pass more testsJacob Young
* 128-bit integer multiplication with overflow * more instruction encodings used by std inline asm * implement the `try_ptr` air instruction * follow correct stack frame abi * enable full panic handler * enable stack traces
2023-10-24InternPool: remove runtime_value representationmlugg
The main goal of this commit is to remove the `runtime_value` field from `InternPool.Key` (and its associated representation), but there are a few dominos. Specifically, this mostly eliminates the "maybe runtime" concept from value resolution in Sema: so some resolution functions like `resolveMaybeUndefValAllowVariablesMaybeRuntime` are gone. This required a small change to struct/union/array initializers, to no longer use `runtime_value` if a field was a `variable` - I'm not convinced this case was even reachable, as `variable` should only ever exist as the trivial value of a global runtime `var` decl. Now, the only case in which a `Sema.resolveMaybeUndefVal`-esque function can return the `variable` key is `resolveMaybeUndefValAllowVariables`, which is directly called from `Sema.resolveInstValueAllowVariables` (previously `Sema.resolveInstValue`), which is only used for resolving the value of a Decl from `Module.semaDecl`. While changing these functions, I also slightly reordered and restructured some of them, and updated their doc comments.
2023-10-23x86_64: implement inline asm GOT reference for PIC targetsJacob Young
2023-10-23x86_64: implement 128-bit builtinsJacob Young
* `@clz` * `@ctz` * `@popCount` * `@byteSwap` * `@bitReverse` * various encodings used by std
2023-10-23x86_64: implement `@mod` for floating-point typesJacob Young
2023-10-23x86_64: implement enough to pass unicode testsJacob Young
* implement vector comparison * implement reduce for bool vectors * fix `@memcpy` bug * enable passing std tests
2023-10-23Merge pull request #17651 from Vexu/error-limitAndrew Kelley
Make distinct error limit configurable (attempt #2)
2023-10-22Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""Jacob Young
This reverts commit 6f0198cadbe29294f2bf3153a27beebd64377566.
2023-10-22Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"Andrew Kelley
This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727. This caused a CI failure when it landed in master branch due to a 128-bit `@byteSwap` in std.mem.
2023-10-22Merge pull request #17637 from jacobly0/x86_64-test-stdJacob Young
x86_64: start to enable `test-std` and `test-compiler-rt` testing
2023-10-22remove uses of non-configurable `err_int`Veikka Tuominen
2023-10-21codegen: implement lowering aligned anon declsJacob Young
2023-10-21InternPool: store alignment of anon declsAndrew Kelley
Commit 5393e56500d499753dbc39704c0161b47d1e4d5c has a flaw pointed out by @mlugg: the `ty` field of pointer values changes when comptime values are pointer-casted. This commit introduces a new encoding which additionally stores the "original pointer type" which is used to store the alignment of the anonymous decl, and potentially other information in the future such as section and pointer address space. However, this new encoding is only used when the original pointer type differs from the casted pointer type in a meaningful way. I was able to make the LLVM backend and the C backend lower anonymous decls with the appropriate alignment, however I will need some help figuring out how to do this for the backends that lower anonymous decls via src/codegen.zig and the wasm backend.
2023-10-21x86_64: fix bugs and disable erroring testsJacob Young
2023-10-21x86_64: disable difficult std tests and hack around more zero-bit typesJacob Young
2023-10-21x86_64: fix crashesJacob Young
2023-10-18x86_64: improve inline assembly supportJacob Young
* C++-style comments * indirect call operands * fix misleading immediate debug formatting
2023-10-17Merge pull request #17556 from ziglang/elf-link-zig-properJakub Konka
elf: port 99% of zld ELF linker to Zig proper
2023-10-17x86_64: fix C abi argument passing in memoryJacob Young
2023-10-16codegen: refactor .actual_got into .extern_gotJakub Konka
2023-10-16codegen+elf: lower imported data refsJakub Konka
2023-10-16x86_64: add -fPIC support targeting ELFJakub Konka