x86_64: implement switch jump tables
This commit is contained in:
@@ -277,8 +277,8 @@ test "function alignment" {
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
|
||||
// function alignment is a compile error on wasm32/wasm64
|
||||
if (native_arch == .wasm32 or native_arch == .wasm64) return error.SkipZigTest;
|
||||
// function alignment is a compile error on wasm
|
||||
if (native_arch.isWasm()) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
fn alignExpr() align(@sizeOf(usize) * 2) i32 {
|
||||
@@ -307,8 +307,8 @@ test "implicitly decreasing fn alignment" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
// function alignment is a compile error on wasm32/wasm64
|
||||
if (native_arch == .wasm32 or native_arch == .wasm64) return error.SkipZigTest;
|
||||
// function alignment is a compile error on wasm
|
||||
if (native_arch.isWasm()) return error.SkipZigTest;
|
||||
|
||||
try testImplicitlyDecreaseFnAlign(alignedSmall, 1234);
|
||||
try testImplicitlyDecreaseFnAlign(alignedBig, 5678);
|
||||
@@ -331,9 +331,9 @@ test "@alignCast functions" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
// function alignment is a compile error on wasm32/wasm64
|
||||
if (native_arch == .wasm32 or native_arch == .wasm64) return error.SkipZigTest;
|
||||
if (native_arch == .thumb or native_arch == .thumbeb) return error.SkipZigTest;
|
||||
// function alignment is a compile error on wasm
|
||||
if (native_arch.isWasm()) return error.SkipZigTest;
|
||||
if (native_arch.isThumb()) return error.SkipZigTest;
|
||||
|
||||
try expect(fnExpectsOnly1(simple4) == 0x19);
|
||||
}
|
||||
@@ -496,9 +496,9 @@ test "align(N) on functions" {
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
// function alignment is a compile error on wasm32/wasm64
|
||||
if (native_arch == .wasm32 or native_arch == .wasm64) return error.SkipZigTest;
|
||||
if (native_arch == .thumb or native_arch == .thumbeb) return error.SkipZigTest;
|
||||
// function alignment is a compile error on wasm
|
||||
if (native_arch.isWasm()) return error.SkipZigTest;
|
||||
if (native_arch.isThumb()) return error.SkipZigTest;
|
||||
|
||||
try expect((@intFromPtr(&overaligned_fn) & (0x1000 - 1)) == 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user