joachimschmidt557
f014de6456
stage2 ARM: fix debug info for arguments passed in registers
2022-09-20 17:14:31 +02:00
joachimschmidt557
258b058eec
stage2 ARM: make sub_sp_scratch MIR instruction use r4
...
r0 is used for argument passing, so this register is not available as
a scratch register upon function entry.
2022-09-20 17:14:27 +02:00
Jakub Konka
2c971f0085
fix code formatting
2022-09-18 10:00:04 +02:00
Jakub Konka
dc6480dba5
macho: allow for add and ldr when resolving GOT_LOAD_* relocs
2022-09-18 10:00:04 +02:00
Jakub Konka
53bd7bd044
macho: move to incremental writes and global relocs for incremental
2022-09-18 10:00:04 +02:00
Koakuma
86dc982e74
stage2: sparc64: Implement airSlicePtr
2022-09-14 16:58:13 -07:00
Koakuma
ed546a7aad
stage2: sparc64: Add placeholder for some Air instructions
...
airAddSat airSubSat airMulSat airShlSat airUnaryMath airPopcount airPrefetch
airPtrElemVal airOptionalPayload airOptionalPayloadPtr airOptionalPayloadPtrSet
2022-09-14 16:58:13 -07:00
Koakuma
0e1c68d90a
stage2: sparc64: Don't track condition_flags_inst in checked binOps
...
This stops the emission of spurious CCR spills.
2022-09-14 16:57:31 -07:00
Koakuma
0464512f2e
stage2: sparc64: Implement airShlWithOverflow
2022-09-14 16:57:31 -07:00
Koakuma
de17fe66a5
stage2: sparc64: Tidy up binOp and enable more operations
...
sub, mul, addwrap, subwrap, mulwrap, shr, shr_exact
2022-09-14 16:57:31 -07:00
Koakuma
ab3d3b260b
stage2: sparc64: Add airClz/airCtz placeholder
2022-09-14 16:57:31 -07:00
Koakuma
b9897c3b84
stage2: sparc64: Implement airMulOverflow for <= 32 bits
2022-09-14 16:57:31 -07:00
Koakuma
844d3a5a74
stage2: sparc64: Fix SPARCv9 shift opcodes encoding
2022-09-14 16:57:31 -07:00
Koakuma
61265fba04
stage2: sparc64: Implement airBinop for bool_and/or
2022-09-14 16:57:31 -07:00
Koakuma
4fc6df9f62
stage2: sparc64: Implement airTagName
2022-09-14 16:57:31 -07:00
Koakuma
f01867f78e
stage2: sparc64: Implement airWrapOptional
2022-09-14 16:57:31 -07:00
Koakuma
b6307144c0
stage2: sparc64: Implement airPtrToInt
2022-09-14 16:57:31 -07:00
Koakuma
2c9ab03b0b
stage2: sparc64: Add airCmpLtErrorsLen placeholder
2022-09-14 16:57:31 -07:00
Koakuma
5b0134e3ed
stage2: sparc64: Change branch_link Mir field definition
2022-09-14 16:57:31 -07:00
Koakuma
64b61f0740
stage2: sparc64: Add airFloatToInt & airIntToFloat placeholder
2022-09-14 16:57:31 -07:00
Andrew Kelley
0a89624d59
stage2: support being built in ReleaseSafe mode
2022-09-13 18:08:59 -07:00
Andrew Kelley
bec70a1a39
stage2: remove pointless discards from source code
...
Good riddance!
2022-09-13 02:04:20 -07:00
Jakub Konka
5778077f9f
Merge pull request #12799 from joachimschmidt557/stage2-arm
...
stage2 ARM: introduce allocRegs mechanism and other improvements
2022-09-10 09:13:08 +02:00
Jakub Konka
485d8819b3
aarch64: update codegen to using a global index rather than local index
2022-09-10 00:57:54 +02:00
Jakub Konka
fc5a6e0e32
x86_64: combine got_load, direct_load and imports_load into linker_load MCV
2022-09-10 00:18:39 +02:00
Jakub Konka
d8f2103545
macho+coff: return index into global table from getGlobalSymbol
2022-09-09 23:30:31 +02:00
joachimschmidt557
94499898e5
stage2 ARM: implement basic array_elem_val
2022-09-09 20:26:04 +02:00
joachimschmidt557
b976997e16
stage2 ARM: implement ptr_elem_val
2022-09-09 19:17:18 +02:00
joachimschmidt557
a0a7d15142
stage2 ARM: support larger function stacks
...
This is done by introducing a new Mir pseudo-instruction
2022-09-09 19:17:18 +02:00
joachimschmidt557
3794f2c493
stage2 ARM: implement struct_field_val for registers
2022-09-09 19:17:18 +02:00
joachimschmidt557
25729d6155
stage2 ARM: fix multiple uses of reuseOperand
...
- 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-09 19:17:18 +02:00
joachimschmidt557
261fec8036
stage2 ARM: amend implementation of various AIR instructions
...
- 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-09 19:17:17 +02:00
joachimschmidt557
e2b029e2c8
stage2 ARM: implement field_parent_ptr
2022-09-09 19:17:17 +02:00
joachimschmidt557
481bd4761a
stage2 ARM: remove remaining uses of binOp{Register,Immediate}
2022-09-09 19:17:17 +02:00
joachimschmidt557
95b8a5f157
stage2 ARM: extract remaining operations out of binOp
2022-09-09 19:17:17 +02:00
joachimschmidt557
fdb2c80bdc
stage2 ARM: extract mul, div, and mod out of binOp
2022-09-09 19:17:17 +02:00
joachimschmidt557
ed4be06883
stage2 ARM: extract add+sub from binOp
...
This commit also lays the groundwork for further extractions from
binOp.
2022-09-09 19:17:17 +02:00
joachimschmidt557
86dd123392
stage2 ARM: move cmp to new allocReg mechanism; remove from binOp
2022-09-09 19:17:17 +02:00
joachimschmidt557
0414ef591a
stage2 ARM: introduce allocRegs
...
This new register allocation mechanism which is designed to be more
generic and flexible will replace binOp.
2022-09-09 19:17:16 +02:00
joachimschmidt557
28cc363947
stage2 ARM: improve Mir representation of mov and cmp
2022-09-09 19:17:13 +02:00
Jakub Konka
56b96cd61b
Merge pull request #12772 from ziglang/coff-basic-imports
...
coff: implement enough of the incremental linker to pass behavior and incremental tests on Windows
2022-09-09 13:08:58 +02:00
Jakub Konka
467d69c68a
x86_64: fix SystemV calling convention
2022-09-07 22:42:57 +02:00
Jakub Konka
66bad3eaaf
coff: mark relocations dirty when target atoms change
2022-09-07 22:42:57 +02:00
Jakub Konka
e0167ae0e3
x86_64: allow for any index register in complex SIB encodings
...
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-07 22:42:57 +02:00
Jakub Konka
619d82234e
x86_64: clean up return registers for unspecified cc
2022-09-07 22:42:57 +02:00
Jakub Konka
28f525baa4
x86_64: handle ptr_stack_offset for blocks
2022-09-07 22:42:56 +02:00
Jakub Konka
1d57b347e9
x86_64: clean up logging
2022-09-07 22:42:56 +02:00
Jakub Konka
b9c31a8703
x86_64: refactor cond_br with canonicaliseBranches helper
2022-09-07 22:42:56 +02:00
Jakub Konka
c0e288c782
x86_64: implement canonicalising branches in switch expression
2022-09-07 22:42:56 +02:00
Jakub Konka
3a4c69c018
x86_64: implement Windows x64 calling convention
2022-09-07 22:42:56 +02:00