aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
AgeCommit message (Collapse)Author
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