aboutsummaryrefslogtreecommitdiff
path: root/src/arch/arm/CodeGen.zig
AgeCommit message (Collapse)Author
2022-09-13stage2: remove pointless discards from source codeAndrew Kelley
Good riddance!
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-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: reorganize the linkerJakub Konka
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
2022-08-13stage2 ARM: pass stack arguments in opposite orderjoachimschmidt557
Earlier arguments have a smaller address (i.e. towards the bottom of the stack)
2022-08-12stage2: generate a switch for `@errSetCast` safetyVeikka Tuominen
2022-08-05stage2: add runtime safety for invalid enum valuesVeikka Tuominen
2022-08-01Removed param_names from Fn inside Module.zigantlilja
Removed the copy of param_names inside of Fn and changed to implementation of getParamName to fetch to parameter name from the ZIR. The signature of getParamName was also changed to take an additional *Module argument.
2022-07-28stage2 ARM: more support for switch statementsjoachimschmidt557
2022-07-23stage2: implement `@setFloatMode`Veikka Tuominen
2022-07-12stage2 ARM: add integer modulo with constant power-of-two rhsjoachimschmidt557
2022-07-12stage2 ARM: implement division by constant int power-of-two divisorsjoachimschmidt557
2022-06-30stage2: lower float negation explicitlyAndrew Kelley
Rather than lowering float negation as `0.0 - x`. * Add AIR instruction for float negation. * Add compiler-rt functions for f128, f80 negation closes #11853
2022-06-25stage2 ARM: implement basic intCast and error union wrappingjoachimschmidt557
2022-06-11stage2: make `error{}` the same size as `anyerror`Veikka Tuominen
Having `error{}` be a zero bit type causes issues when it interracts with empty inferred error sets which are the same size as `anyerror`.
2022-06-06Merge pull request #11783 from ziglang/stage2-tryAndrew Kelley
introduce a "try" ZIR and AIR instruction
2022-06-06dwarf: fix incorrect type reloc for unionsJakub Konka
Split type relocs into two kinds: local and global. Global relocs use a global type resolver and calculate offset to the existing definition of a type abbreviation. Local relocs use offset in the abbrev section of the containing atom plus addend to generate a local relocation.
2022-06-06stage2 ARM: implement `try` AIR instructionjoachimschmidt557
2022-06-05stage2: implement the new "try" ZIR/AIR instructionAndrew Kelley
Implements semantic analysis for the new try/try_inline ZIR instruction. Adds the new try/try_ptr AIR instructions and implements them for the LLVM backend. Fixes not calling rvalue() for tryExpr in AstGen. This is part of an effort to implement #11772.
2022-06-04stage2 ARM: introduce support for basic switch expressionsjoachimschmidt557
2022-06-02stage2 ARM: rework cmp in preparation for switchjoachimschmidt557
2022-05-27math: make `cast` return optional instead of an errorAli Chraghi
2022-05-24stage2: fixes for error unions, optionals, errorsAndrew Kelley
* `?E` where E is an error set with only one field now lowers the same as `bool`. * Fix implementation of errUnionErrOffset and errUnionPayloadOffset to properly compute the offset of each field. Also name them the same as the corresponding LLVM functions and have the same function signature, to avoid confusion. This fixes a bug where wasm was passing the error union type instead of the payload type. * Fix C backend handling of optionals with zero-bit payload types. * C backend: separate out airOptionalPayload and airOptionalPayloadPtr which reduces branching and cleans up control flow. * Make Type.isNoReturn return true for error sets with no fields. * Make `?error{}` have only one possible value (null).
2022-05-24stage2 ARM: update to new union layoutjoachimschmidt557
2022-05-22stage2 ARM: fix recursive fibonaccijoachimschmidt557
Some handling of register_c_flag/register_v_flag was incorrect.
2022-05-21stage2 ARM: Introduce MCValue.cpsr_flagsjoachimschmidt557
MCValue.cpsr_flags replaces MCValue.compare_flags_{signed,unsigned}. This simplifies a lot of stuff and enables an MCValue to represent only the overflow bits in the CPU (previously, it was only possible to represent a register + the overflow bits).
2022-05-19regalloc: make register class bitmask non-optionalJakub Konka
2022-05-19regalloc: allow for optional selector mask when allocatingJakub Konka
2022-05-17stage2: fix pointer arithmetic result typeAndrew Kelley
This makes it so the result of doing pointer arithmetic creates a new pointer type that has adjusted alignment.
2022-05-16stage2: disable error return tracing on unsupported targetsVeikka Tuominen
2022-05-16stage2: implement error return tracesVeikka Tuominen
2022-05-16arm: sub_with_overflow should always track V flagJakub Konka
2022-05-07arm: lock dest register in shl_overflow so that we do not spill itJakub Konka
Nerf two tests - they will require further investigation, but arm now passes all tests with the safety PR.
2022-05-07arm: fix CF flags spilling and implement genSetStack for reg with overflow flagsJakub Konka