aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
AgeCommit message (Collapse)Author
2020-12-21stage2 ARM: implement basic binary bitwise operationsjoachimschmidt557
2020-12-09stage2+aarch64: clean up offset helper structsJakub Konka
2020-12-09stage2+aarch64: fix stage2 testsJakub Konka
2020-12-09stage2+aarch64: use stp and ldp to navigate MachO jump tableJakub Konka
2020-12-03Merge pull request #7273 from kubkon/lld-codesig-pocAndrew Kelley
lld+macho: patch lld output on Apple Silicon by calculating and embedding adhoc code signature
2020-12-02stage2: wire up -Dskip-non-nativeAndrew Kelley
The purpose of this is to save time in the edit-compile-test cycle when working on stage2 code.
2020-12-01lld: use commands.LoadCommand in self-hosted linkerJakub Konka
2020-11-28stage2 ARM: use strb + implement genBoolOpjoachimschmidt557
2020-11-28stage2 ARM: Implement genNotjoachimschmidt557
2020-11-28stage2 codegen: use switch in genBoolOpjoachimschmidt557
2020-11-28stage2 ARM: genAdd, genSub for simple casesjoachimschmidt557
2020-11-27stage2 macho: apply more review commentsJakub Konka
2020-11-27Update src/codegen.zigJakub Konka
Co-authored-by: Andrew Kelley <andrew@ziglang.org>
2020-11-26stage2 macho: move PIE fixups to link file; fix testsJakub Konka
2020-11-26stage2 macho: add orr and orn instructionsJakub Konka
2020-11-26stage2 macho: Hello, Silicon!Jakub Konka
2020-11-26stage2 macho: refactor PIE generation on x86_64Jakub Konka
2020-11-26stage2 macho: first, rough draft at trampoliningJakub Konka
2020-11-26stage2 macho: use RIP-relative for memory-set regs x86_64Jakub Konka
2020-11-19Add builtin.Signedness, use it instead of is_signedTadeo Kondrak
2020-11-16Move leb128 and remove trivial *mem functions as discussed in #5588 (#6876)tgschultz
* Move leb128 out of debug and remove trivial *mem functions as discussed in #5588 * Turns out one of the *Mem functions was used by MachO. Replaced with trivial use of FixedBufferStream.
2020-11-11stage2 aarch64: add genCall for aarch64 MachOJakub Konka
2020-11-11stage2 aarch64: add .memory prong in genSetRegJakub Konka
2020-11-11stage2 ARM: start implementing genCall for ELF + genSetReg immediatesjoachimschmidt557
2020-11-11stage2 aarch64: add more instructionsjoachimschmidt557
2020-11-11Add move wide with zero (movz) instructionJakub Konka
2020-11-11Add basic genSetReg for aarch64Jakub Konka
2020-11-11Implement genAsm on aarch64Jakub Konka
Add remaining PCS info: param and return registers in procedure calls.
2020-11-11stage2 aarch64: add codegen/aarch64.zigjoachimschmidt557
2020-11-07stage2 ARM: miscellaneous improvementsjoachimschmidt557
2020-10-30stage2: switch put swap condbr and blockVexu
condbr is noreturn so having the other way around caused subsequent cases to be eliminated as dead
2020-10-30stage2: switch ranges and multi item prongsVexu
2020-10-30stage2: switch emit zirVexu
2020-10-30stage2: basic switch analysisVexu
2020-10-25stage2 ARM: genSetStack and genSetReg from stackjoachimschmidt557
2020-10-25stage2 ARM: enable backpatching return statementjoachimschmidt557
2020-10-25stage2 ARM: better immediate loading feat. movw and movtjoachimschmidt557
2020-10-07fixups for the previous commitAndrew Kelley
* std.fs.File.copyRange and copyRangeAll return u64 instead of usize - the returned value is how much of the `len` is transferred, so the types should match. This removes the need for an `@intCast`. * fix typo that removed a subtraction * Fix the size of codegen.AnyMCValue which gave me a compile error when I tried to build self-hosted for i386-linux. * restore the coercion to u64 of syms_sect.sh_info. We want to make sure the multiplication happens with 64 bits and not the smaller type used by the ELF format. * fix another offset parameter in link/Elf.zig to be u64 instead of usize * add a nice little TODO note to help out Jakub * FmtError already has FileTooBig in it; we just need to return it.
2020-10-05Turn zig fmt back on in various src/ filesjoachimschmidt557
2020-10-04Merge pull request #6255 from joachimschmidt557/stage2-armAndrew Kelley
stage2 ARM: more instructions, return values, parameters
2020-10-04Redo local symbols and offsets tracking to match Elf's approachJakub Konka
2020-10-04Add missing ensureCapacity call in codegenJakub Konka
2020-10-04Fix after rebase and enable stage2 tests for macOSJakub Konka
Also, rewrites codegen section to store symbol address in a register to then later invoke `callq` on the register.
2020-10-02stage2 ARM: Add push, pop alias instructions; non-leaf functionsjoachimschmidt557
Non-leaf functions now work. Combined with simple parameters and return types, this allows more complicated programs than Hello World to be correctly compiled.
2020-10-02stage2 ARM: Add stm, ldm variants and misc. additionsjoachimschmidt557
2020-10-02stage2 ARM: start adding more instructions, return values, parametersjoachimschmidt557
2020-09-21rename src-self-hosted/ to src/Andrew Kelley