aboutsummaryrefslogtreecommitdiff
path: root/src/stage1
AgeCommit message (Collapse)Author
2022-12-06actually remove stage1Andrew Kelley
2022-11-23spirv: assemblerRobin Voetter
spirv: introduce SpvModule.Fn to generate function code into spirv: assembler error message setup spirv: runtime spec info spirv: inline assembly tokenizer spirv: inline assembly lhs result/opcode parsing spirv: forgot to fmt spirv: tokenize opcodes and assigned result-ids spirv: operand parsing setup spirv: assembler string literals spirv: assembler integer literals spirv: assembler value enums spirv: assembler bit masks spirv: update assembler to new asm air format spirv: target 1.5 for now Current vulkan sdk version (1.3.204) ships spirv tools targetting 1.5, and so these do not work with binaries targetting 1.6 yet. In the future, this version number should be decided by the target. spirv: store operands in flat arraylist. Instead of having dedicated Operand variants for variadic operands, just flatten them and store them in the normal inst.operands list. This is a little simpler, but is not easily decodable in the operand data representation. spirv: parse variadic assembly operands spirv: improve assembler result-id tokenization spirv: begin instruction processing spirv: only remove decl if it was actually allocated spirv: work around weird miscompilation Seems like there are problems with switch in anonymous struct literals. spirv: begin resolving some types in assembler spirv: improve instruction processing spirv: rename some types + process OpTypeInt spirv: process OpTypeVector spirv: process OpTypeMatrix and OpTypeSampler spirv: add opcode class to spec, remove @exclude'd instructions spirv: process more type instructions spirv: OpTypeFunction spirv: OpTypeOpaque spirv: parse LiteralContextDependentNumber operands spirv: emit assembly instruction into right section spirv: parse OpPhi parameters spirv: inline assembly inputs spirv: also copy air types spirv: inline assembly outputs spirv: spir-v address spaces spirv: basic vector constants/types and shuffle spirv: assembler OpTypeImage spirv: some stuff spirv: remove spirv address spaces for now
2022-11-21CMake: choose native CPU instead of baseline by defaultAndrew Kelley
2022-11-18fmt: canonicalize identifiersStevie Hryciw
2022-11-18stage1: delete keywordsStevie Hryciw
Backports 05cf449 to the C++ implementation.
2022-11-16llvm: implement arbitrary precision debug enumeratorsVeikka Tuominen
Closes #645
2022-11-10cmake: Mark <root>/.git/HEAD as a configure dependencyCody Tapscott
This ensures that the Zig version will be re-computed when jumping through the source tree, which is especially important if bisecting across AstGen- or other changes that must not use the old cache.
2022-10-30stage1: Make `x and false`/`x or true` comptime-knownCody Tapscott
We need to be careful to respect side-effects/branching in these cases, but otherwise this behaves very similarly to multiplication. `lhs and rhs == false` if either lhs or rhs is comptime-known `false`, just like `lhs * rhs == 0` if either lhs or rhs is comptime-known to be zero. Similar reasoning applies to `lhs or rhs`.
2022-10-22CMake: detect use of CMAKE_PREFIX_PATH env varAndrew Kelley
CMake recognizes the CMAKE_PREFIX_PATH environment variable for some things, and also the CMAKE_PREFIX_PATH cache variable for other things. However, it does not relate these two things, i.e. if the environment variable is set, CMake does not populate the cache variable in a corresponding manner. Some package systems, such as Homebrew, set the environment variable but not the cache variable. Furthermore, the environment variable follows the system path separator, such as ':' on POSIX and ';' on Windows, but the cache variable follows CMake's array behavior, i.e. always ';' for a separator. Closes #13242
2022-10-18all: rename `@maximum` to `@max` and `@minimum` to `@min`Ali Chraghi
2022-10-15Merge branch 'amdgpu-improvements' of https://github.com/Snektron/zig into ↵Andrew Kelley
Snektron-amdgpu-improvements
2022-10-15Merge pull request #12918 from jacobly0/math-cast-comptime-intAndrew Kelley
std.math: fix behavior relating to comptime_int arguments
2022-10-14stage1: Fix ppcle `long double` sizeCody Tapscott
Resolves #13110
2022-10-13Disable llvm.prefetch for PowerPCCody Tapscott
This instruction is not supported on this backend, so should just be a noop.
2022-10-13stage1: Add softfloat support for `@reduce`Cody Tapscott
2022-10-13stage1: Rely on softfloat for `f16` on non-arm targetsCody Tapscott
2022-10-12build.zig: Forward LLVM lib/include dirs from CMakeJacob Young
Previously, you might obtain `-lLLVM-15` from the CMake configuration, but we might not be able to locate the library if it's not in your system library path.
2022-10-12backport @addrSpaceCast to stage 1Robin Voetter
2022-10-12amdgpu: add AmdgpuKernel calling conventionRobin Voetter
2022-10-10Fix building with Clang 16Eric Joldasov
Related: https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240
2022-10-03Merge pull request #12979 from Vexu/inline-switchAndrew Kelley
Implement inline switch cases
2022-09-27add inline switch union tag capturesVeikka Tuominen
2022-09-27AstGen: analyze inline switch casesVeikka Tuominen
2022-09-27stage1+2: parse inline switch casesVeikka Tuominen
2022-09-25llvm: update uwtable value for stage1kcbanner
2022-09-20std: add return address parameter to panic fnVeikka Tuominen
2022-08-29Merge remote-tracking branch 'origin/master' into llvm15Andrew Kelley
2022-08-22stage2+stage1: remove type parameter from bit builtinsVeikka Tuominen
Closes #12529 Closes #12511 Closes #6835
2022-08-18std.Target gains ObjectFormat fieldAndrew Kelley
2022-08-10stage2: Implement explicit backing integers for packed structsIsaac Freund
Now the backing integer of a packed struct type may be explicitly specified with e.g. `packed struct(u32) { ... }`.
2022-08-07remove 'builtin.stage2_arch', Sema is smart enough nowMeghan Denny
2022-08-05stage1: another LLVM opaque pointers fixAndrew Kelley
2022-08-03LLVM backends: more LLVM 15 fixesAndrew Kelley
uwtable now needs a "sync" or "async" parameter. more opaque pointer fixes
2022-08-03stage1: more LLVM15 opaque pointers fixesAndrew Kelley
2022-08-02stage1: fix a few more LLVM 15 opaque pointer bugsAndrew Kelley
2022-08-02more LLVM backend fixesAndrew Kelley
more carnage from opaque pointers API
2022-08-02LLVM backend fixesAndrew Kelley
Fixing assertions hit after upgrading to opaque pointers API.
2022-08-01LLVM backends: work around poorly designed C APIAndrew Kelley
As part of the Opaque Pointers upgrade documentation, LLVM says that the function LLVMGetGEPSourceElementType() can be used to obtain element type information in lieu of LLVMGetElementType(), however, this function actually returns the struct type, not the field type. The GEP instruction does store the information we need, however, this is not exposed in the C API. It seems like they accidentally exposed the wrong field, because one would never need the struct type since one must already pass it directly to the GEP instruction, so one will always have it handy, whereas one will usually not have the field type handy.
2022-08-01stage1: avoid using LLVMGetElementTypeAndrew Kelley
2022-08-01fix bugs from previous two commitsAndrew Kelley
2022-08-01stage1: LLVM lowering to opaque pointers APIAndrew Kelley
2022-07-31update Target, CPU, OS, ABI, etc. to LLVM 15Andrew Kelley
2022-07-29stage1: remove deadcode ast_printWei Fu
Fixes: 2a990d696 ("stage1: rework tokenizer to match stage2") Fixes: b6354ddd5 ("move AST rendering code to separate file") Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-07-26Merge pull request #12136 from topolarity/llvm-config-reworkAndrew Kelley
CMake: Improve usage of `llvm-config` (esp. for consistent static/shared linking)
2022-07-23CMake: Add ZIG_LLVM_LINK_MODE to config.hCody Tapscott
This is currently unused, but it will be needed soon so that we can avoid linking static libc++ if LLVM/Clang is configured as a shared library.
2022-07-23Fix #6944: referencing type info alignment causes error in unrelated functionYujiri
2022-07-19delete the stage1 implementation of autodocAndrew Kelley
2022-07-11stage1: fix typo in analyze.cpp (#12077)Ikko Ashimine
accomodate -> accommodate
2022-07-10stage1: Lower libcalls on Windows x86-64 correctlyCody Tapscott
This change is the Zig counterpart to https://reviews.llvm.org/D110413 Since we lower some libcalls directly (just like clang does), we need to make sure that the ABI we call with matches the ABI of the compiler-rt we are providing (and also the ABI expected by LLVM). While I was at it, I noticed some flawed vector handling in the binary soft float ops in stage 1, so I shored up the logic a bit and expanded an existing test to cover the missing functionality.
2022-07-10stage1/codegen: replace sprintf() with snprintf()Frank Denis
Calling sprintf() is now triggering an error on Xcode 14. Using snprintf() is generally not a bad idea anyway.