x64: fix ptr_add

However, still missing is taking into account pointer alignment
when performing arithmetic.
This commit is contained in:
Jakub Konka
2022-02-11 16:13:05 +01:00
parent c7775a9f62
commit 78e6f9c44c
3 changed files with 27 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ const expectEqual = testing.expectEqual;
test "array to slice" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
const a: u32 align(4) = 3;
const b: u32 align(8) = 4;