diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-06-16 14:18:08 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-06-17 16:38:59 -0700 |
| commit | 25671f5a973c209bdf75f8be567cc5e441a865cb (patch) | |
| tree | 0f34046f069cb51058fcb9643774973e36d1ceb3 /lib/compiler_rt/trunctfdf2.zig | |
| parent | c99c085d70c9347ec9a15d9a4f73c19e628912b7 (diff) | |
| download | zig-25671f5a973c209bdf75f8be567cc5e441a865cb.tar.gz zig-25671f5a973c209bdf75f8be567cc5e441a865cb.zip | |
compiler-rt: move SPARC functions into appropriate compilation units
Diffstat (limited to 'lib/compiler_rt/trunctfdf2.zig')
| -rw-r--r-- | lib/compiler_rt/trunctfdf2.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compiler_rt/trunctfdf2.zig b/lib/compiler_rt/trunctfdf2.zig index 012de610c3..3fe16ad6a2 100644 --- a/lib/compiler_rt/trunctfdf2.zig +++ b/lib/compiler_rt/trunctfdf2.zig @@ -6,6 +6,8 @@ pub const panic = common.panic; comptime { if (common.want_ppc_abi) { @export(__trunckfdf2, .{ .name = "__trunckfdf2", .linkage = common.linkage }); + } else if (common.want_sparc_abi) { + @export(_Qp_qtod, .{ .name = "_Qp_qtod", .linkage = common.linkage }); } else { @export(__trunctfdf2, .{ .name = "__trunctfdf2", .linkage = common.linkage }); } @@ -18,3 +20,7 @@ fn __trunctfdf2(a: f128) callconv(.C) f64 { fn __trunckfdf2(a: f128) callconv(.C) f64 { return truncf(f64, f128, a); } + +fn _Qp_qtod(a: *const f128) callconv(.C) f64 { + return truncf(f64, f128, a.*); +} |
