aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86_64/CodeGen.zig
AgeCommit message (Collapse)Author
2024-03-26Zcu.Decl: remove `ty` fieldmlugg
`Decl` can no longer store un-interned values, so this field is now unnecessary. The type can instead be fetched with the new `typeOf` helper method, which just gets the type of the Decl's `Value`.
2024-03-11std.builtin: make atomic order fields lowercaseTristan Ross
2024-03-11std.builtin: make container layout fields lowercaseTristan Ross
2024-03-06InternPool: create specialized functions for loading namespace typesmlugg
Namespace types (`struct`, `enum`, `union`, `opaque`) do not use structural equality - equivalence is based on their Decl index (and soon will change to AST node + captures). However, we previously stored all other information in the corresponding `InternPool.Key` anyway. For logical consistency, it makes sense to have the key only be the true key (that is, the Decl index) and to load all other data through another function. This introduces those functions, by the name of `loadStructType` etc. It's a big diff, but most of it is no-brainer changes. In future, it might be nice to eliminate a bunch of the loaded state in favour of accessor functions on the `LoadedXyzType` types (like how we have `LoadedUnionType.size()`), but that can be explored at a later date.
2024-03-02Air: replace `.dbg_inline_*` with `.dbg_inline_block`Jacob Young
This prevents the possibility of not emitting a `.dbg_inline_end` instruction and reduces the allocation requirements of the backends. Closes #19093
2024-02-26compiler: decide dbg_var scoping based on AIR blocksmlugg
This commit eliminates the `dbg_block_{begin,end}` instructions from both ZIR and AIR. Instead, lexical scoping of `dbg_var_{ptr,val}` instructions is decided based on the AIR block they exist within. This is a much more robust system, and also results in a huge drop in ZIR bytes - around 7% for Sema.zig. This required some enhancements to Sema to prevent elision of blocks when they are required for debug variable scoping. This can be observed by looking at the AIR for the following simple test program with and without `-fstrip`: ```zig export fn f() void { { var a: u32 = 0; _ = &a; } { var a: u32 = 0; _ = &a; } } ``` When `-fstrip` is passed, no AIR blocks are generated. When `-fno-strip` is passed, the ZIR blocks are lowered to true AIR blocks to give correct lexical scoping to the debug vars. The changes here incidentally reolve #19060. A corresponding behavior test has been added. Resolves: #19060
2024-02-25x86_64: implement more shufflesJacob Young
2024-02-25x86_64: implement optional comparisonsJacob Young
Closes #18959
2024-02-25x86_64: fix avx2 `@truncacte`Jacob Young
2024-02-25Sema: implement vector coercionsJacob Young
These used to be lowered elementwise in air, and now are a single air instruction that can be lowered elementwise in the backend if necessary.
2024-02-25x86_64: implement `@shuffle`Jacob Young
2024-02-25x86_64: fix inline asm match constraintsJacob Young
2024-02-25x86_64: implement `@select`Jacob Young
2024-02-25x86_64: fix incorrect mnemonic selectionJacob Young
2024-02-22Builder: fix float constants in llvm irJacob Young
2024-02-16InternPool: make more use of `NullTerminatedString.Slice`Jacob Young
This should avoid the random pointer invalidation crashes. Closes #18954
2024-02-14x86_64: fix crash loading a packed value from a spilled pointerJacob Young
Unblocks #18923
2024-02-12x86_64: implement `@clz` and `@ctz` of big integersJacob Young
2024-02-12x86_64: implement `@byteSwap` of big integersJacob Young
2024-02-12x86_64: fix compiler_rt testsJacob Young
2024-02-12x86_64: implement shifts of big integersJacob Young
2024-02-12x86_64: fix register clobberJacob Young
2024-02-12x86_64: implement c abi for bool vectorsJacob Young
2024-02-12x86_64: implement `@abs` of big integersJacob Young
2024-02-12x86_64: fix assert locationJacob Young
2024-02-12x86_64: fix packed loadJacob Young
2024-02-12x86_64: implement `ret_safe`Jacob Young
2024-02-12x86_64: fix incorrect alignment checkJacob Young
2024-02-12x86_64: implement mul, div, and mod of large integersJacob Young
This enables the last compiler-rt test disabled for the x86_64 backend.
2024-02-06x86: remove final vestiges of mir_to_air (#18836)Pyry Kovanen
2024-02-06add the `clflush` mnemDavid Rubin
2024-02-05compiler: rename value.zig to Value.zigAndrew Kelley
This commit only does the file rename to be friendlier to version control conflicts.
2024-02-05x86_64: fix miscompilations on baselineJacob Young
2024-01-29llvm: ensure returned undef is 0xaa bytes when runtime safety is enabledVeikka Tuominen
Closes #13178
2024-01-24x86_64: save TLS to stack for MachOJakub Konka
2024-01-24codegen: implement more missing bitsJakub Konka
2024-01-24codegen: re-implement enough of codegen to error out instead panicJakub Konka
2024-01-24macho: get the ball rolling!Jakub Konka
2024-01-01fix remaining compile errors except oneAndrew Kelley
2024-01-01fix more compilation errors introduced by this branchAndrew Kelley
2024-01-01fix a round of compile errors caused by this branchAndrew Kelley
2024-01-01compiler: update references to targetAndrew Kelley
2024-01-01update references to module (to be renamed to zcu)Andrew Kelley
2023-12-04x86_64: fix packed struct field reuseJacob Young
2023-12-04x86_64: fix vector comparisionsJacob Young
2023-12-04x86_64: implement more operations on vectors with 1-bit elementsJacob Young
2023-12-03x86_64: implement movement for pointer vectorsJacob Young
2023-12-03x86_64: "implement" `aggregate_init` for vectorsJacob Young
2023-12-03x86_64: implement some todosJacob Young
2023-12-03x86_64: implement more compliant vectorsJacob Young