aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
AgeCommit message (Collapse)Author
2023-03-17main: add debug option to dump unoptimized llvm irJacob Young
2023-03-07CBE: implement unsigned big int div and modJacob Young
2023-03-05llvm: fix lowering of `@trap`Andrew Kelley
It needed an unreachable instruction after it.
2023-03-05Merge pull request #14789 from jacobly0/ditypeAndrew Kelley
llvm: fix use after free with pointers to optional slices
2023-03-05CBE: fix reduce of emulated integersJacob Young
2023-03-05CBE: ensure uniqueness of more internal identifiersJacob Young
2023-03-05CBE: implement select and shuffleJacob Young
2023-03-05CBE: implement splatJacob Young
2023-03-05CBE: implement vector truncateJacob Young
2023-03-05CBE: implement vector element pointersJacob Young
2023-03-05CBE: implement vector operationsJacob Young
Also, bigint add and sub which is all I was actually trying to do.
2023-03-05CBE: fix behavior test failures on msvcJacob Young
2023-03-05CBE: implement some big integer and vector unary operationsJacob Young
2023-03-05CBE: implement big integer and vector comparisonsJacob Young
2023-03-05CBE: implement big integer literalsJacob Young
2023-03-04llvm: fix incorrectly annotated DITypeJacob Young
Closes #14715 Closes #14783
2023-03-04add @trap builtinr00ster91
This introduces a new builtin function that compiles down to something that results in an illegal instruction exception/interrupt. It can be used to exit a program abnormally. This implements the builtin for all backends.
2023-02-27llvm: fix untagged struct names in debug info for llvm (again)Jacob Young
At least lldb misbehaves with all these same-named unions, so just generate a unique name.
2023-02-25CBE: replace locals list with a hash mapJacob Young
Replace `ArrayList` with `ArrayHashMap` since we want to be able to remove by element.
2023-02-24CBE: reuse locals with the same `CType` instead of `Type`Jacob Young
Many `Type`s can correspond to the same `CType`, so this reduces the number of used locals by 27760 when compiling only-c. Also, disabled some tests that were only passing by accident and shouldn't really be considered working.
2023-02-23CBE: implement the futureJacob Young
Turns out f(...) will be supported one day.
2023-02-23CBE: apply some maybe payload cleanupsJacob Young
2023-02-23CBE: simplify always_tail call logicJacob Young
It should be Sema's job to check this anyway.
2023-02-23CBE: delete stage1 hacksJacob Young
2023-02-23CType: cleanupJacob Young
2023-02-23CBE: fix MSVC diagnostics generated by the behavior testsJacob Young
After this, the last MSVC warnings are in behavior/bugs/529.zig: behavior.c(37971): warning C4133: 'function': incompatible types - from 'A__8479 *' to 'A__8474 *' behavior.c(37974): warning C4133: 'function': incompatible types - from 'A__8480 *' to 'A__8474 *'
2023-02-23CBE: support call attributesJacob Young
* Support always_tail and never_tail/never_inline with a comptime callee using clang * Support never_inline using gcc * Support never_inline using msvc Unfortunately, can't enable behavior tests because of the conditional support.
2023-02-23CBE: implement c varargsJacob Young
Removed some backend test skip checks for things disabled in std.
2023-02-23CType: fix lowering of generic function pointerJacob Young
2023-02-23CBE: cleanup field accessJacob Young
* Implement @fieldParentPtr on a union * Refactor field access to ensure that it is handled consistently * Remove `renderTypecast` as it is now behaves the same as `renderType`
2023-02-22Merge pull request #14691 from jacobly0/ctypeAndrew Kelley
2023-02-21CBE: fix windows test failuresJacob Young
2023-02-21Sema: implement @fieldParentPtr for unionsIsaac Freund
2023-02-21CBE: fix test failuresJacob Young
2023-02-21CBE: use CType for type definitionsJacob Young
2023-02-21CBE: remove typedef data structuresJacob Young
Adds a new mechanism for `@tagName` function generation that doesn't piggyback on the removed typedef system.
2023-02-20CBE: use stdint.h types instead of `zig_` prefixesJacob Young
This requires manual defines before C99 which may not have stdint.h. Also have update-zig1 leave a copy of lib/zig.h in stage1/zig.h, which allows lib/zig.h to be updated without needing to update zig1.wasm. Note that since the object already existed with the exact same contents, this completely avoids repo bloat due to zig.h changes.
2023-02-20CBE: fix comptime checksJacob Young
2023-02-20CBE: use CType for type renderingJacob Young
2023-02-20CBE: add CType interningJacob Young
2023-02-18update std lib and compiler sources to new for loop syntaxAndrew Kelley
2023-02-11llvm: fix lowerDeclRefValue for extern function aliasesVeikka Tuominen
Same as 0577069af5f5deb859762725736537d60c324453 for extern functions. Closes #14610
2023-02-11zig fmt: do not consider tuples blocksVeikka Tuominen
Closes #14056
2023-02-02Merge pull request #14502 from ziglang/link-owned-atomsJakub Konka
link: move ownership of linker atom from frontend to the linkers
2023-02-01link: make SpirV atoms fully owned by the linkerJakub Konka
2023-01-31move compiler's CType logic to std.TargetAndrew Kelley
This API only depends on std.Target and is extremely useful in build scripts when populating configure files.
2023-01-29cbe: fixes for tls, support for not linking libc, and enabling testskcbanner
- cbe: Implement linksection support, to support TLS when not linking libc - cbe: Support under-aligned variables / struct fields - cbe: Support packed structs (in the C definition of packed) - windows: Fix regression with x86 _tls_array - compiler_rt: Add 128-bit atomics to compiler_rt - tests: Re-enable threadlocal tests on cbe+windows, and llvm+x86 - tests: Re-enable f80 tests that now pass - ci: change windows ci to run the CBE behaviour tests with -lc, to match how the compiler is bootstrapped - update zig1.wasm
2023-01-29cbe: don't emit unused undefined array literalskcbanner
2023-01-23zig fmt fixupkcbanner
2023-01-23cbe: fixes for x86kcbanner
- Emit calling convention - Fix .Naked handling for msvc - Add teb helper for x86 - Fix 128-bit shl implementation when rhs is >= 64 - Add 128-bit shl tests