aboutsummaryrefslogtreecommitdiff
path: root/src/arch
AgeCommit message (Collapse)Author
2024-02-29wasm: re-implement `updateExports`Luuk de Gram
We now correctly create a symbol for each exported decl with its export- name. The symbol points to the same linker-object. We store a map from decl to all of its exports so we can update exports if it already exists rather than infinitely create new exports.
2024-02-29wasm: create linking objects in correct moduleLuuk de Gram
CodeGen will create linking objects such as symbols, function types, etc in ZigObject, rather than in the linker driver where the final result will be stored. They will end up in the linker driver module during the `flush` phase instead. This must mean we must call functions such as `addOrGetFuncType` in the correct namespace or else it will be created in the incorrect list and therefore return incorrect indexes.
2024-02-29wasm: move incremental Dwarf info into ZigObjectLuuk de Gram
2024-02-27Merge pull request #19102 from ziglang/decouple-zirAndrew Kelley
JIT `zig fmt` and `zig reduce`
2024-02-27Merge pull request #18538 from Pangoraw/wasm_vector_abiLuuk de Gram
wasm: allow non-int vectors
2024-02-26move Zcu.LazySrcLoc to std.zig.LazySrcLocAndrew Kelley
Part of an effort to ship more of the compiler in source form.
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-25Merge pull request #18906 from jacobly0/x86_64-testsAndrew Kelley
x86_64: pass more tests
2024-02-25test: rework how filtering worksJacob Young
* make test names contain the fully qualified name * make test filters match the fully qualified name * allow multiple test filters, where a test is skipped if it does not match any of the specified filters
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-17lib/std/elf: refactor reloc enum valuesJakub Konka
2024-02-17elf: create Zig specific reloc type shared across ISAsJakub Konka
2024-02-17elf: add riscv dynamic relocsJakub Konka
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-14wasm: allow non-int vectorsPaul Berg
The current Wasm ABI classification function fails to handle non-integer vectors because of the call to `intInfo`.
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-11wasm: correctly lower packed structs in argumentsLuuk de Gram
When an argument is a 'local', which is the case when it's a parameter, we should not attempt to load it from memory. Instead, we directly emit it to the stack. Only when the `WValue` is ensure to live in the linear data section do we load it from memory onto the stack. closes #18894
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-02-02InternPool: use separate key for slicesmlugg
This change eliminates some problematic recursive logic in InternPool, and provides a safer API.
2024-01-31x86_64+macho: emit .got instead of .got_load relocsJakub Konka
2024-01-29llvm: ensure returned undef is 0xaa bytes when runtime safety is enabledVeikka Tuominen
Closes #13178
2024-01-24macho: ensure we zero-out regions after copying them overJakub Konka
This is to ensure that the loader correctly zeroes-out zerofill sections when mapping them. For context, Apple's loader dyld will map the regions where any zerofill would theoretically reside as belonging to zerofill section.
2024-01-24macho: actually lower TLS variablesJakub Konka
2024-01-24x86_64: emit MachO TLV sequenceJakub Konka
2024-01-24x86_64: save TLS to stack for MachOJakub Konka
2024-01-24macho: again fix symbol index dereference in codegen wrt ZigObjectJakub Konka
2024-01-24macho: fix symbol index dereference in codegen wrt ZigObjectJakub Konka
This is incredibly confusing and I really need to simplify it. Elf also possesses this shortcoming so once I get Coff up to speed it should hopefully become clear on how to refactor this.