zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit d819663543bd2f19bcabb86978adf06931a2dd8b (tree)
parent ba55e32ef2d8ed5875bff8524fbbb05c6d8afd40
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Fri, 21 Jan 2022 14:42:58 -0700

disable some broken stuff for stage2 llvm backend on aarch64

Diffstat:
Mlib/std/special/compiler_rt.zig | 4+++-
Mtest/behavior/cast_llvm.zig | 4+++-
Mtest/behavior/inttoptr.zig | 3+++
3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/std/special/compiler_rt.zig b/lib/std/special/compiler_rt.zig @@ -26,7 +26,9 @@ comptime { if (builtin.zig_backend == .stage1) { _ = @import("compiler_rt/atomics.zig"); } - _ = @import("compiler_rt/clear_cache.zig").clear_cache; + if (builtin.zig_backend != .stage2_llvm) { // TODO + _ = @import("compiler_rt/clear_cache.zig").clear_cache; + } const __extenddftf2 = @import("compiler_rt/extendXfYf2.zig").__extenddftf2; @export(__extenddftf2, .{ .name = "__extenddftf2", .linkage = linkage }); diff --git a/test/behavior/cast_llvm.zig b/test/behavior/cast_llvm.zig @@ -1,8 +1,9 @@ +const builtin = @import("builtin"); const std = @import("std"); const expect = std.testing.expect; const mem = std.mem; const maxInt = std.math.maxInt; -const native_endian = @import("builtin").target.cpu.arch.endian(); +const native_endian = builtin.target.cpu.arch.endian(); test "pointer reinterpret const float to int" { // The hex representation is 0x3fe3333333333303. @@ -46,6 +47,7 @@ fn incrementVoidPtrArray(array: ?*anyopaque, len: usize) void { } test "compile time int to ptr of function" { + if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) return error.SkipZigTest; // TODO try foobar(FUNCTION_CONSTANT); } diff --git a/test/behavior/inttoptr.zig b/test/behavior/inttoptr.zig @@ -1,4 +1,7 @@ +const builtin = @import("builtin"); + test "casting random address to function pointer" { + if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) return error.SkipZigTest; // TODO randomAddressToFunction(); comptime randomAddressToFunction(); }