diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2021-12-29 20:55:05 +0100 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2021-12-29 22:06:38 +0100 |
| commit | b7e223597395358dc63cf88c92ace5eaa455cf89 (patch) | |
| tree | 51108f8b375f49eac43b24bbc839dfefdada4f3e /src/codegen/spirv.zig | |
| parent | 08ea1a2eab9472389d57ddbd97e307fcb096a992 (diff) | |
| download | zig-b7e223597395358dc63cf88c92ace5eaa455cf89.tar.gz zig-b7e223597395358dc63cf88c92ace5eaa455cf89.zip | |
stage2: lower 1-byte and 2-byte values saved to stack
* fix handling of `ah`, `bh`, `ch`, and `dh` registers (which are
actually used as aliases to `dil`, etc. registers). Currenly, we
treat them as aliases only meaning when we encounter `ah` we make
sure to set the REX.W to promote the instruction to 64bits and use
`dil` register instead - otherwise we might have mismatch between
registers used in different parts of the codegen. In the future,
we can and should use `ah`, etc. as upper 8bit halves of 16bit
registers `ax`, etc.
* fix bug in `airCmp` where `.cmp` MIR instruction shouldn't force
type `Bool` but let the type of the original type propagate downwards
- we need this to make an informed choice of the target register
size and hence choose the right encoding down the line.
* implement lowering of 1-byte and 2-byte values to stack and add
matching stage2 tests for x86_64 codegen
Diffstat (limited to 'src/codegen/spirv.zig')
0 files changed, 0 insertions, 0 deletions
