aboutsummaryrefslogtreecommitdiff
path: root/src/arch/sparcv9/CodeGen.zig
AgeCommit message (Collapse)Author
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-05stage2: sparcv9: Add debug info generation for argsKoakuma
2022-05-05stage2: sparcv9: Remove dbg_arg instructionKoakuma
2022-05-05stage2: sparcv9: Simplify genLoad/genStoreKoakuma
2022-05-05stage2: sparcv9: Fix stack space accountingKoakuma
2022-05-05stage2: sparcv9: Pad branch delay slots with nopsKoakuma
2022-05-05stage2: sparcv9: Implement basic stack load/storesKoakuma
2022-05-05stage2: sparcv9: Implement jmpl loweringKoakuma
2022-05-02stage2: improve inline asm stage1 compatibilityAndrew Kelley
* outputs can have names and be referenced with template replacements the same as inputs. * fix print_air.zig not decoding correctly. * LLVM backend: use a table for template names for simplicity
2022-04-27add new builtin function `@tan`Andrew Kelley
The reason for having `@tan` is that we already have `@sin` and `@cos` because some targets have machine code instructions for them, but in the case that the implementation needs to go into compiler-rt, sin, cos, and tan all share a common dependency which includes a table of data. To avoid duplicating this table of data, we promote tan to become a builtin alongside sin and cos. ZIR: The tag enum is at capacity so this commit moves `field_call_bind_named` to be `extended`. I measured this as one of the least used tags in the zig codebase. Fix libc math suffix for `f32` being wrong in both stage1 and stage2. stage1: add missing libc prefix for float functions.
2022-04-20stage2: use indexes for Decl objectsAndrew Kelley
Rather than allocating Decl objects with an Allocator, we instead allocate them with a SegmentedList. This provides four advantages: * Stable memory so that one thread can access a Decl object while another thread allocates additional Decl objects from this list. * It allows us to use u32 indexes to reference Decl objects rather than pointers, saving memory in Type, Value, and dependency sets. * Using integers to reference Decl objects rather than pointers makes serialization trivial. * It provides a unique integer to be used for anonymous symbol names, avoiding multi-threaded contention on an atomic counter.
2022-04-15update self hosted sources to language changesVeikka Tuominen
2022-04-14stage2: sparcv9: Add cmp_lt_errors_len AIR inst & fix asm parsingKoakuma
2022-04-14stage2: sparcv9: Implement enough instruction to compile simple exesKoakuma
2022-04-14stage2: sparcv9: zig fmtKoakuma
2022-04-14stage2: sparcv9: implement basic instruction loweringKoakuma
2022-04-14stage2: sparcv9: Implement basic asm codegenKoakuma
2022-04-14stage2: sparcv9: Add breakpoint, ret, and calling mechanismKoakuma
2022-04-14stage2: sparcv9: Add placeholders to generate a minimal programKoakuma
2022-04-14stage2: sparcv9: Different formatting for genBodyKoakuma
2022-04-14stage2: sparcv9: Adjust RegisterManager settingsKoakuma
2022-04-14stage2: sparcv9: Placeholder for Air instructions in genBodyKoakuma
2022-04-14stage2: sparcv9: Implement basic prologue/epilogue Mir emissionKoakuma
2022-04-14stage2: sparcv9: Initial resolveCallingConventionValues implementationKoakuma
2022-04-14stage2: sparcv9: Add skeleton codegen impl and necessary fieldsKoakuma
2022-04-14stage2: sparcv9: Add some initial checks in codegenKoakuma
2022-03-19stage2 sparcv9: Fix unused parameter errors in CodegenKoakuma
2022-03-19stage2 sparcv9: Add placeholder files and generate() functionKoakuma
Add placeholder files for Codegen, Emit, and Mir stages, complete with a placeholder implementation of generate() to make it able to be plugged in to the frontend. At the moment the implementation just panics, it'll be worked on incrementally later. Also, this registers the sparcv9 backend files into CMakeLists.txt.