| author | |
| committer | |
| log | 2c681d7ba15e9eba2e94cb74e7e7d03c90c01863 |
| tree | 11592db6952817d2ec000d721cbb93a379edf23d |
| parent | f3a7c346ddfdac516cf82f5c0771fd07398a20ef |
| signature |
it's disabled on aarch64, see #32824 files changed, 16 insertions(+), 6 deletions(-)
src/analyze.cpp+3-3| ... | ... | @@ -7633,7 +7633,7 @@ static void resolve_llvm_types_slice(CodeGen *g, ZigType *type, ResolveStatus wa |
| 7633 | 7633 | type->data.structure.resolve_status = ResolveStatusLLVMFull; |
| 7634 | 7634 | } |
| 7635 | 7635 | |
| 7636 | static LLVMTypeRef get_llvm_array_type(unsigned byte_size) { | |
| 7636 | static LLVMTypeRef get_llvm_type_of_n_bytes(unsigned byte_size) { | |
| 7637 | 7637 | return byte_size == 1 ? |
| 7638 | 7638 | LLVMInt8Type() : LLVMArrayType(LLVMInt8Type(), byte_size); |
| 7639 | 7639 | } |
| ... | ... | @@ -7735,7 +7735,7 @@ static void resolve_llvm_types_struct(CodeGen *g, ZigType *struct_type, ResolveS |
| 7735 | 7735 | size_t full_abi_size = get_abi_size_bytes(full_bit_count, g->pointer_size_bytes); |
| 7736 | 7736 | if (full_abi_size * 8 == full_bit_count) { |
| 7737 | 7737 | // next field recovers ABI alignment |
| 7738 | element_types[gen_field_index] = get_llvm_array_type(full_abi_size); | |
| 7738 | element_types[gen_field_index] = get_llvm_type_of_n_bytes(full_abi_size); | |
| 7739 | 7739 | gen_field_index += 1; |
| 7740 | 7740 | first_packed_bits_offset_misalign = SIZE_MAX; |
| 7741 | 7741 | } |
| ... | ... | @@ -7808,7 +7808,7 @@ static void resolve_llvm_types_struct(CodeGen *g, ZigType *struct_type, ResolveS |
| 7808 | 7808 | if (first_packed_bits_offset_misalign != SIZE_MAX) { |
| 7809 | 7809 | size_t full_bit_count = packed_bits_offset - first_packed_bits_offset_misalign; |
| 7810 | 7810 | size_t full_abi_size = get_abi_size_bytes(full_bit_count, g->pointer_size_bytes); |
| 7811 | element_types[gen_field_index] = get_llvm_array_type(full_abi_size); | |
| 7811 | element_types[gen_field_index] = get_llvm_type_of_n_bytes(full_abi_size); | |
| 7812 | 7812 | gen_field_index += 1; |
| 7813 | 7813 | } |
| 7814 | 7814 |
test/stage1/behavior.zig+1-3| ... | ... | @@ -72,9 +72,7 @@ comptime { |
| 72 | 72 | _ = @import("behavior/misc.zig"); |
| 73 | 73 | _ = @import("behavior/muladd.zig"); |
| 74 | 74 | _ = @import("behavior/namespace_depends_on_compile_var.zig"); |
| 75 | // See #3268 | |
| 76 | if (@import("builtin").arch != .aarch64) | |
| 77 | _ = @import("behavior/new_stack_call.zig"); | |
| 75 | _ = @import("behavior/new_stack_call.zig"); | |
| 78 | 76 | _ = @import("behavior/null.zig"); |
| 79 | 77 | _ = @import("behavior/optional.zig"); |
| 80 | 78 | _ = @import("behavior/pointers.zig"); |
test/stage1/behavior/new_stack_call.zig+3| ... | ... | @@ -4,6 +4,9 @@ const expect = std.testing.expect; |
| 4 | 4 | var new_stack_bytes: [1024]u8 align(16) = undefined; |
| 5 | 5 | |
| 6 | 6 | test "calling a function with a new stack" { |
| 7 | // TODO: https://github.com/ziglang/zig/issues/3268 | |
| 8 | if (@import("builtin").arch == .aarch64) return error.SkipZigTest; | |
| 9 | ||
| 7 | 10 | const arg = 1234; |
| 8 | 11 | |
| 9 | 12 | const a = @newStackCall(new_stack_bytes[0..512], targetFunction, arg); |
test/stage1/behavior/widening.zig+9| ... | ... | @@ -27,3 +27,12 @@ test "float widening" { |
| 27 | 27 | expect(b == c); |
| 28 | 28 | expect(c == d); |
| 29 | 29 | } |
| 30 | ||
| 31 | test "float widening f16 to f128" { | |
| 32 | // TODO https://github.com/ziglang/zig/issues/3282 | |
| 33 | if (@import("builtin").arch == .aarch64) return error.SkipZigTest; | |
| 34 | ||
| 35 | var x: f16 = 12.34; | |
| 36 | var y: f128 = x; | |
| 37 | expect(x == y); | |
| 38 | } |