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