aboutsummaryrefslogtreecommitdiff
path: root/lib/std/start.zig
AgeCommit message (Collapse)Author
2023-04-13add c_char typeAndrew Kelley
closes #875
2023-04-12never use C pointers!!Andrew Kelley
you maniacs, you absolute monsters. degenerates. hooligans. criminals. issue #2984 is coming for you.
2023-04-09spirv: minimal start codeRobin Voetter
For SPIR-V, only export the main function if it is actually declared. Kernel entry points will often have parameters and more than one kernel declared. In general, SPIR-V binaries should mostly be compiled as libraries and not as executables. However, this start code is required so that we can build test executables. Note that a call to isSpirV() would emit the code for that function, even though the call is at comptime. To save that function from being emitted the checks are just inlined manually.
2023-04-03start: disable extra start logic on various x86_64 subtargetsJacob Young
2023-04-03Elf: add program headers for the program header tableJacob Young
2023-04-02x86_64: implement large cmpJacob Young
2023-02-17ignore SIGPIPE by defaultJonathan Marler
2023-02-04Add support for mips64/mips64elSuirad
2023-01-05std: collect all options under one namespaceVeikka Tuominen
2023-01-05Don't initialize the static TLS area in single-threaded buildsJens Goldberg
2022-12-17std.builtin: rename Type.Fn's args to paramsr00ster91
This was a poor naming choice; these are parameters, not arguments. Parameters specify what kind of arguments are expected, whereas the arguments are the actual values passed.
2022-12-17std.builtin: rename Type.Fn.Param's arg_type to typer00ster91
It's the type of a parameter, not an argument, but the prefix is redundant either way.
2022-12-13update usages of `@call`Veikka Tuominen
2022-11-04all: rename i386 to x86Ali Chraghi
2022-10-31cbe: improve support for non-native float typesJacob Young
* Fix _start on aarch64. * Add fallbacks when a float type is unsupported. Fixes #13357
2022-10-25cbe: update test casesJacob Young
2022-10-25std: add cbe hacks to more targetsJacob Young
These are needed because clang doesn't support anything in naked functions, not even assembly register inputs.
2022-10-25cbe: get enough things working to support basic programsJacob Young
* Enable advanced start support. * Enable advanced test_runner support. * Zig Language Reference's Hello World now works.
2022-09-07coff: re-enable default entrypoint for WindowsJakub Konka
2022-08-30coff: fallback to _start as default entry point for nowJakub Konka
This is not technically correct, but given that we are not yet able to link against the CRT, it's a good default until then. Add basic logging of generated symbol table in the linker.
2022-08-30coff: add missing bits required for minimal PE exampleJakub Konka
2022-08-30start: allow for explicitly defined entry point for WinJakub Konka
2022-08-07remove 'builtin.stage2_arch', Sema is smart enough nowMeghan Denny
2022-07-26start code: enable segfault handler for stage2Andrew Kelley
2022-07-11Sema: validate extern typesVeikka Tuominen
2022-07-09Remove outdated TODO comment (#12053)Yusuke Tanaka
2022-05-13target: Rename sparcv9 -> sparc64Koakuma
Rename all references of sparcv9 to sparc64, to make Zig align more with other projects. Also, added new function to convert glibc arch name to Zig arch name, since it refers to the architecture as sparcv9. This is based on the suggestion by @kubkon in PR 11847. (https://github.com/ziglang/zig/pull/11487#pullrequestreview-963761757)
2022-05-02std: enable real start code always for LLVM backendAndrew Kelley
2022-04-16start.zig: make sure macos uses full startup codeJakub Konka
2022-04-14stage2: zig fmtKoakuma
2022-04-14stage2: sparcv9: Add exit2 implementationKoakuma
2022-04-14stage2: sparcv9: Register the backend in stdlib & driverKoakuma
2022-03-21Sema: dummy implementation of `@errorReturnTrace`Andrew Kelley
Also update std/build.zig to use stage2 function pointer semantics. This gets us a little bit closer to `zig build` working, although it is now hitting a new crash in the compiler.
2022-03-11stage2: passing threadlocal tests for x86_64-linuxAndrew Kelley
* use the real start code for LLVM backend with x86_64-linux - there is still a check for zig_backend after initializing the TLS area to skip some stuff. * introduce new AIR instructions and implement them for the LLVM backend. They are the same as `call` except with a modifier. - call_always_tail - call_never_tail - call_never_inline * LLVM backend calls hasRuntimeBitsIgnoringComptime in more places to avoid unnecessarily depending on comptimeOnly being resolved for some types. * LLVM backend: remove duplicate code for setting linkage and value name. The canonical place for this is in `updateDeclExports`. * LLVM backend: do some assembly template massaging to make `%%` rendered as `%`. More hacks will be needed to make inline assembly catch up with stage1.
2022-02-08wasm: update test runnerLuuk de Gram
This updates the test runner for stage2 to emit to stdout with the passed, skipped and failed tests similar to the LLVM backend. Another change to this is the start function, as it's now more in line with stage1's. The stage2 test infrastructure for wasm/wasi has been updated to reflect this as well.
2022-01-27fix startup procedure for async WinMainvnc5
2022-01-24Avoid duplicate TLS startup symbolsSizhe Zhao
2022-01-17remove `zig_is_stage2` from `@import("builtin")`Andrew Kelley
Instead use the standarized option for communicating the zig compiler backend at comptime, which is `zig_backend`. This was introduced in commit 1c24ef0d0b09a12a1fe98056f2fc04de78a82df3.
2021-11-29wasm: Update wasm stage2 test backend to use 'main'Luuk de Gram
2021-11-28wasm: Implement 'zig test'Luuk de Gram
- This implements the required codegen for decl types such as pointers, arrays, structs and more. - Wasm's start function can now use both a 'u8' and 'void' as return type. This will help us with writing tests using the stage2 testing backend. (Until all tests of behavioural tests pass). - Now correctly generates relocations for function pointers. - Also implements unwrapping error union error, as well as return pointers.
2021-11-27wasm: Add temporary stage2 entrypoint for wasmLuuk de Gram
2021-11-20stage2 RISCV64: implement basic function prologue and epiloguejoachimschmidt557
2021-09-22Remove reference to stage2_osMartin Wickham
2021-09-22Make stage2 start.zig work on WindowsMartin Wickham
2021-09-16stage2: implement `@setAlignStack` and 128-bit cmpxchgAndrew Kelley
* test runner is improved to respect `error.SkipZigTest` * start code is improved to `@setAlignStack(16)` before calling main() * the newly passing behavior test has a workaround for the fact that stage2 cannot yet call `std.Target.x86.featureSetHas()` at comptime. This is blocking on comptime closures. The workaround is that there is a new decl `@import("builtin").stage2_x86_cx16` which is a `bool`. * Implement `@setAlignStack`. This language feature should be re-evaluated at some point - I'll file an issue for it. * LLVM backend: apply/remove the cold attribute and noinline attribute where appropriate. * LLVM backend: loads and stores are properly annotated with alignment and volatile attributes. * LLVM backend: allocas are properly annotated with alignment. * Type: fix integers reporting wrong alignment for 256-bit integers and beyond. Once you get to 16 byte aligned, there is no further alignment for larger integers.
2021-09-13stage2: implement Value.copy for structs and unionsAndrew Kelley
The stage2_os hack inside `@import("builtin")` is no longer needed.
2021-09-01std: fix regressions from this branchAndrew Kelley
Also move some usingnamespace test cases from compare_output to behavior.
2021-08-29zig fmt: respect trailing commas in inline assemblyjdmichaud
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-07-27WASI,libc: enable tests.Takeshi Yoneda
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>