mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
x86_64: fix bitcast from f80
This commit is contained in:
parent
24c67992e0
commit
24d76500d2
@ -11332,11 +11332,15 @@ fn airBitCast(self: *Self, inst: Air.Inst.Index) !void {
|
||||
break :dst dst_mcv;
|
||||
};
|
||||
|
||||
if (dst_ty.isRuntimeFloat()) break :result dst_mcv;
|
||||
|
||||
const dst_signedness =
|
||||
if (dst_ty.isAbiInt(mod)) dst_ty.intInfo(mod).signedness else .unsigned;
|
||||
const src_signedness =
|
||||
if (src_ty.isAbiInt(mod)) src_ty.intInfo(mod).signedness else .unsigned;
|
||||
if (dst_signedness == src_signedness) break :result dst_mcv;
|
||||
if (!src_ty.isRuntimeFloat() or src_ty.floatBits(self.target.*) != 80) {
|
||||
const src_signedness =
|
||||
if (src_ty.isAbiInt(mod)) src_ty.intInfo(mod).signedness else .unsigned;
|
||||
if (dst_signedness == src_signedness) break :result dst_mcv;
|
||||
}
|
||||
|
||||
const abi_size: u16 = @intCast(dst_ty.abiSize(mod));
|
||||
const bit_size: u16 = @intCast(dst_ty.bitSize(mod));
|
||||
|
||||
@ -1294,7 +1294,7 @@ test "neg f80/f128/c_longdouble" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
|
||||
|
||||
try testNeg(f80);
|
||||
try comptime testNeg(f80);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user