aboutsummaryrefslogtreecommitdiff
path: root/src/arch
AgeCommit message (Collapse)Author
2022-09-13stage2: remove pointless discards from source codeAndrew Kelley
Good riddance!
2022-09-10Merge pull request #12799 from joachimschmidt557/stage2-armJakub Konka
stage2 ARM: introduce allocRegs mechanism and other improvements
2022-09-10aarch64: update codegen to using a global index rather than local indexJakub Konka
2022-09-10x86_64: combine got_load, direct_load and imports_load into linker_load MCVJakub Konka
2022-09-09macho+coff: return index into global table from getGlobalSymbolJakub Konka
2022-09-09stage2 ARM: implement basic array_elem_valjoachimschmidt557
2022-09-09stage2 ARM: implement ptr_elem_valjoachimschmidt557
2022-09-09stage2 ARM: support larger function stacksjoachimschmidt557
This is done by introducing a new Mir pseudo-instruction
2022-09-09stage2 ARM: implement struct_field_val for registersjoachimschmidt557
2022-09-09stage2 ARM: fix multiple uses of reuseOperandjoachimschmidt557
- add missing checks whether destination fits into the operand - remove reuseOperand invocations from airIsNullPtr and similar functions as we need to load the operands into temporary locations
2022-09-09stage2 ARM: amend implementation of various AIR instructionsjoachimschmidt557
- unwrap_errunion_err for registers - unwrap_errunion_payload for registers - ptr_slice_len_ptr for all MCValues - ptr_slice_ptr_ptr for all MCValues
2022-09-09stage2 ARM: implement field_parent_ptrjoachimschmidt557
2022-09-09stage2 ARM: remove remaining uses of binOp{Register,Immediate}joachimschmidt557
2022-09-09stage2 ARM: extract remaining operations out of binOpjoachimschmidt557
2022-09-09stage2 ARM: extract mul, div, and mod out of binOpjoachimschmidt557
2022-09-09stage2 ARM: extract add+sub from binOpjoachimschmidt557
This commit also lays the groundwork for further extractions from binOp.
2022-09-09stage2 ARM: move cmp to new allocReg mechanism; remove from binOpjoachimschmidt557
2022-09-09stage2 ARM: introduce allocRegsjoachimschmidt557
This new register allocation mechanism which is designed to be more generic and flexible will replace binOp.
2022-09-09stage2 ARM: improve Mir representation of mov and cmpjoachimschmidt557
2022-09-09Merge pull request #12772 from ziglang/coff-basic-importsJakub Konka
coff: implement enough of the incremental linker to pass behavior and incremental tests on Windows
2022-09-07x86_64: fix SystemV calling conventionJakub Konka
2022-09-07coff: mark relocations dirty when target atoms changeJakub Konka
2022-09-07x86_64: allow for any index register in complex SIB encodingsJakub Konka
This relieves register pressure, and reduce generated code size (since now we can use the same index register for both `mov_scale_src` and `mov_scale_dst` MIR instructions). Fix lowering of ModRM + SIB encodings where index register is extended - previously, we would carelessly ignore the fact generating incorrect encodings.
2022-09-07x86_64: clean up return registers for unspecified ccJakub Konka
2022-09-07x86_64: handle ptr_stack_offset for blocksJakub Konka
2022-09-07x86_64: clean up loggingJakub Konka
2022-09-07x86_64: refactor cond_br with canonicaliseBranches helperJakub Konka
2022-09-07x86_64: implement canonicalising branches in switch expressionJakub Konka
2022-09-07x86_64: implement Windows x64 calling conventionJakub Konka
2022-09-07coff: fix runtime trapsJakub Konka
2022-09-07coff: implement lowering unnamed constsJakub Konka
2022-09-07x86_64: add support for Win64/C calling conventionJakub Konka
2022-09-07coff: fix contents of IAT, and ensure codegen loads addr into regJakub Konka
As far as I can see, unlike with MachO, we don't have any stubs helper routines available and need to load a bound pointer into a register to then call it.
2022-09-07coff: add relocation for call_externJakub Konka
2022-09-07coff: re-enable default entrypoint for WindowsJakub Konka
2022-09-07wasm: fix memory leakLuuk de Gram
2022-09-04stage2 llvm: implement aarch64 C ABIVeikka Tuominen
... at least enough to pass all the current tests.
2022-09-03stage2 llvm: improve handling of i128 on Windows C ABIVeikka Tuominen
2022-09-03Sema: only ABI sized packed structs are extern compatibleVeikka Tuominen
2022-08-30test/link: add test for extern resolutionLuuk de Gram
Adds a linker tests to verify extern/undefined symbols representing non-functions are being resolved correctly.
2022-08-30wasm: create relocations for extern declsLuuk de Gram
This also fixes performing relocations for data symbols of which the target symbol exists in an external object file. We do this by checking if the target symbol was discarded, and if so: get the new location so that we can find the corresponding atom that belongs to said new location. Previously it would always assume the symbol would live in the same file as the atom/symbol that is doing the relocation.
2022-08-30coff: cleanup relocations; remove COFF support from other backendsJakub Konka
Given that COFF will want to support PIC from ground-up, there is no point in leaving outdated code for COFF in other backends such as arm or aarch64. Instead, when we are ready to look into those, we can start figuring out what to add and where.
2022-08-30coff: add basic handling of GOT PC relative indirectionJakub Konka
2022-08-30coff: reorganize the linkerJakub Konka
2022-08-24stage2: explicitly tagged enums no longer have one possible valueAndrew Kelley
Previously, Zig had inconsistent semantics for an enum like this: `enum(u8){zero = 0}` Although in theory this can only hold one possible value, the tag `zero`, Zig no longer will treat the type this way. It will do loads and stores, as if the type has runtime bits. Closes #12619 Tests passed locally: * test-behavior * test-cases
2022-08-22stage2+stage1: remove type parameter from bit builtinsVeikka Tuominen
Closes #12529 Closes #12511 Closes #6835
2022-08-18wasm: fix callInstrinsic return valueLuuk de Gram
Rather than storing it in a local and returning that, we now keep this on the stack as all internal functions expect it to be on the stack already and therefore were generating extra `local.set` instructions.
2022-08-15Merge pull request #12416 from Vexu/stage2-safetyVeikka Tuominen
Stage2 error set safety improvements
2022-08-13stage2 ARM: add inline memcpy to genSetStackjoachimschmidt557
2022-08-13stage2 ARM: Fix tracking of function return valuesjoachimschmidt557