diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-10-22 17:12:12 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-10-22 17:12:12 -0700 |
| commit | 01c1f415209f5085e09430cc6df182d7eb2245ee (patch) | |
| tree | 9f93de2769afd58bf1a88db0b9b266aa24bb4b66 /src/arch/aarch64/CodeGen.zig | |
| parent | b24e9b6347afc66aa94f61b3ed4c2d02cdb0d0ee (diff) | |
| download | zig-01c1f415209f5085e09430cc6df182d7eb2245ee.tar.gz zig-01c1f415209f5085e09430cc6df182d7eb2245ee.zip | |
stage2: slice and alignment fixes
* Fix backend using wrong union field of the slice instruction.
* LLVM backend properly sets alignment on global variables.
* Sema: add coercion for *T to *[1]T
* Sema: pointers to Decls with explicit alignment now have alignment
metadata in them.
Diffstat (limited to 'src/arch/aarch64/CodeGen.zig')
| -rw-r--r-- | src/arch/aarch64/CodeGen.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arch/aarch64/CodeGen.zig b/src/arch/aarch64/CodeGen.zig index 155ac6de68..2c6feec70c 100644 --- a/src/arch/aarch64/CodeGen.zig +++ b/src/arch/aarch64/CodeGen.zig @@ -876,7 +876,8 @@ fn airMax(self: *Self, inst: Air.Inst.Index) !void { } fn airSlice(self: *Self, inst: Air.Inst.Index) !void { - const bin_op = self.air.instructions.items(.data)[inst].bin_op; + const ty_pl = self.air.instructions.items(.data)[inst].ty_pl; + const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; const result: MCValue = if (self.liveness.isUnused(inst)) .dead else return self.fail("TODO implement slice for {}", .{self.target.cpu.arch}); return self.finishAir(inst, result, .{ bin_op.lhs, bin_op.rhs, .none }); } |
