diff options
| author | gracefu <81774659+gracefuu@users.noreply.github.com> | 2021-04-09 14:05:53 +0800 |
|---|---|---|
| committer | gracefu <81774659+gracefuu@users.noreply.github.com> | 2021-04-16 15:21:17 +0800 |
| commit | 5bd464e386df35bfe38b062190074ce3c2689001 (patch) | |
| tree | b6f8a6f4b6e82814a8a20d7975cd9f1ce5f9b8de /src/codegen | |
| parent | 36df1526da0e703a9f3d5bd6c8775d3f0e0f0a33 (diff) | |
| download | zig-5bd464e386df35bfe38b062190074ce3c2689001.tar.gz zig-5bd464e386df35bfe38b062190074ce3c2689001.zip | |
stage2 x86_64: use abi size to determine 64-bit operation
From my very cursory reading, it seems that the register manager doesn't
distinguish between registers that are physically the same but have
different sizes.
In that case, this means that during codegen, we can't rely on
`reg.size()` when determining the width of the operations we have to
perform. Instead, we must use some form of `ty.abiSize(self.target.*)`
to determine the size of the type we're operating with. If this size is
64 bits, then we should enable 64-bit operation.
This fixed a bug in the codegen for spilling instructions, which was
overwriting the previous stack entry with zeroes. See the modified test
case in this commit.
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions
