diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-01-19 00:10:42 +0100 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2020-01-19 00:12:27 +0100 |
| commit | 5fbc1c28121c1030de5ba8ca106a3dd8516cfd87 (patch) | |
| tree | a5ca2b5d1e739e7c52df2609c30d6929c9317f7c /lib/std | |
| parent | 3247fd7862bc5277a2c931f56b41f4f7c085611c (diff) | |
| download | zig-5fbc1c28121c1030de5ba8ca106a3dd8516cfd87.tar.gz zig-5fbc1c28121c1030de5ba8ca106a3dd8516cfd87.zip | |
Nuke some more code
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/special/compiler_rt.zig | 20 | ||||
| -rw-r--r-- | lib/std/special/compiler_rt/arm/aeabi_dcmp.zig | 30 | ||||
| -rw-r--r-- | lib/std/special/compiler_rt/arm/aeabi_fcmp.zig | 30 | ||||
| -rw-r--r-- | lib/std/special/compiler_rt/compareXf2.zig | 52 |
4 files changed, 62 insertions, 70 deletions
diff --git a/lib/std/special/compiler_rt.zig b/lib/std/special/compiler_rt.zig index 0867629091..90dbf0cdf4 100644 --- a/lib/std/special/compiler_rt.zig +++ b/lib/std/special/compiler_rt.zig @@ -226,18 +226,18 @@ comptime { @export(@import("compiler_rt/divsf3.zig").__aeabi_fdiv, .{ .name = "__aeabi_fdiv", .linkage = linkage }); @export(@import("compiler_rt/divdf3.zig").__aeabi_ddiv, .{ .name = "__aeabi_ddiv", .linkage = linkage }); - @export(@import("compiler_rt/arm/aeabi_fcmp.zig").__aeabi_fcmpeq, .{ .name = "__aeabi_fcmpeq", .linkage = linkage }); - @export(@import("compiler_rt/arm/aeabi_fcmp.zig").__aeabi_fcmplt, .{ .name = "__aeabi_fcmplt", .linkage = linkage }); - @export(@import("compiler_rt/arm/aeabi_fcmp.zig").__aeabi_fcmple, .{ .name = "__aeabi_fcmple", .linkage = linkage }); - @export(@import("compiler_rt/arm/aeabi_fcmp.zig").__aeabi_fcmpge, .{ .name = "__aeabi_fcmpge", .linkage = linkage }); - @export(@import("compiler_rt/arm/aeabi_fcmp.zig").__aeabi_fcmpgt, .{ .name = "__aeabi_fcmpgt", .linkage = linkage }); + @export(@import("compiler_rt/compareXf2.zig").__aeabi_fcmpeq, .{ .name = "__aeabi_fcmpeq", .linkage = linkage }); + @export(@import("compiler_rt/compareXf2.zig").__aeabi_fcmplt, .{ .name = "__aeabi_fcmplt", .linkage = linkage }); + @export(@import("compiler_rt/compareXf2.zig").__aeabi_fcmple, .{ .name = "__aeabi_fcmple", .linkage = linkage }); + @export(@import("compiler_rt/compareXf2.zig").__aeabi_fcmpge, .{ .name = "__aeabi_fcmpge", .linkage = linkage }); + @export(@import("compiler_rt/compareXf2.zig").__aeabi_fcmpgt, .{ .name = "__aeabi_fcmpgt", .linkage = linkage }); @export(@import("compiler_rt/compareXf2.zig").__aeabi_fcmpun, .{ .name = "__aeabi_fcmpun", .linkage = linkage }); - @export(@import("compiler_rt/arm/aeabi_dcmp.zig").__aeabi_dcmpeq, .{ .name = "__aeabi_dcmpeq", .linkage = linkage }); - @export(@import("compiler_rt/arm/aeabi_dcmp.zig").__aeabi_dcmplt, .{ .name = "__aeabi_dcmplt", .linkage = linkage }); - @export(@import("compiler_rt/arm/aeabi_dcmp.zig").__aeabi_dcmple, .{ .name = "__aeabi_dcmple", .linkage = linkage }); - @export(@import("compiler_rt/arm/aeabi_dcmp.zig").__aeabi_dcmpge, .{ .name = "__aeabi_dcmpge", .linkage = linkage }); - @export(@import("compiler_rt/arm/aeabi_dcmp.zig").__aeabi_dcmpgt, .{ .name = "__aeabi_dcmpgt", .linkage = linkage }); + @export(@import("compiler_rt/compareXf2.zig").__aeabi_dcmpeq, .{ .name = "__aeabi_dcmpeq", .linkage = linkage }); + @export(@import("compiler_rt/compareXf2.zig").__aeabi_dcmplt, .{ .name = "__aeabi_dcmplt", .linkage = linkage }); + @export(@import("compiler_rt/compareXf2.zig").__aeabi_dcmple, .{ .name = "__aeabi_dcmple", .linkage = linkage }); + @export(@import("compiler_rt/compareXf2.zig").__aeabi_dcmpge, .{ .name = "__aeabi_dcmpge", .linkage = linkage }); + @export(@import("compiler_rt/compareXf2.zig").__aeabi_dcmpgt, .{ .name = "__aeabi_dcmpgt", .linkage = linkage }); @export(@import("compiler_rt/compareXf2.zig").__aeabi_dcmpun, .{ .name = "__aeabi_dcmpun", .linkage = linkage }); } diff --git a/lib/std/special/compiler_rt/arm/aeabi_dcmp.zig b/lib/std/special/compiler_rt/arm/aeabi_dcmp.zig deleted file mode 100644 index 47e7fac81a..0000000000 --- a/lib/std/special/compiler_rt/arm/aeabi_dcmp.zig +++ /dev/null @@ -1,30 +0,0 @@ -// Ported from: -// -// https://github.com/llvm/llvm-project/commit/d674d96bc56c0f377879d01c9d8dfdaaa7859cdb/compiler-rt/lib/builtins/arm/aeabi_dcmp.S - -const comparedf2 = @import("../comparedf2.zig"); - -pub fn __aeabi_dcmpeq(a: f64, b: f64) callconv(.AAPCS) i32 { - @setRuntimeSafety(false); - return @boolToInt(@call(.{ .modifier = .always_inline }, comparedf2.__eqdf2, .{ a, b }) == 0); -} - -pub fn __aeabi_dcmplt(a: f64, b: f64) callconv(.AAPCS) i32 { - @setRuntimeSafety(false); - return @boolToInt(@call(.{ .modifier = .always_inline }, comparedf2.__ltdf2, .{ a, b }) < 0); -} - -pub fn __aeabi_dcmple(a: f64, b: f64) callconv(.AAPCS) i32 { - @setRuntimeSafety(false); - return @boolToInt(@call(.{ .modifier = .always_inline }, comparedf2.__ledf2, .{ a, b }) <= 0); -} - -pub fn __aeabi_dcmpge(a: f64, b: f64) callconv(.AAPCS) i32 { - @setRuntimeSafety(false); - return @boolToInt(@call(.{ .modifier = .always_inline }, comparedf2.__gedf2, .{ a, b }) >= 0); -} - -pub fn __aeabi_dcmpgt(a: f64, b: f64) callconv(.AAPCS) i32 { - @setRuntimeSafety(false); - return @boolToInt(@call(.{ .modifier = .always_inline }, comparedf2.__gtdf2, .{ a, b }) > 0); -} diff --git a/lib/std/special/compiler_rt/arm/aeabi_fcmp.zig b/lib/std/special/compiler_rt/arm/aeabi_fcmp.zig deleted file mode 100644 index c53643b368..0000000000 --- a/lib/std/special/compiler_rt/arm/aeabi_fcmp.zig +++ /dev/null @@ -1,30 +0,0 @@ -// Ported from: -// -// https://github.com/llvm/llvm-project/commit/d674d96bc56c0f377879d01c9d8dfdaaa7859cdb/compiler-rt/lib/builtins/arm/aeabi_fcmp.S - -const comparesf2 = @import("../comparesf2.zig"); - -pub fn __aeabi_fcmpeq(a: f32, b: f32) callconv(.AAPCS) i32 { - @setRuntimeSafety(false); - return @boolToInt(@call(.{ .modifier = .always_inline }, comparesf2.__eqsf2, .{ a, b }) == 0); -} - -pub fn __aeabi_fcmplt(a: f32, b: f32) callconv(.AAPCS) i32 { - @setRuntimeSafety(false); - return @boolToInt(@call(.{ .modifier = .always_inline }, comparesf2.__ltsf2, .{ a, b }) < 0); -} - -pub fn __aeabi_fcmple(a: f32, b: f32) callconv(.AAPCS) i32 { - @setRuntimeSafety(false); - return @boolToInt(@call(.{ .modifier = .always_inline }, comparesf2.__lesf2, .{ a, b }) <= 0); -} - -pub fn __aeabi_fcmpge(a: f32, b: f32) callconv(.AAPCS) i32 { - @setRuntimeSafety(false); - return @boolToInt(@call(.{ .modifier = .always_inline }, comparesf2.__gesf2, .{ a, b }) >= 0); -} - -pub fn __aeabi_fcmpgt(a: f32, b: f32) callconv(.AAPCS) i32 { - @setRuntimeSafety(false); - return @boolToInt(@call(.{ .modifier = .always_inline }, comparesf2.__gtsf2, .{ a, b }) > 0); -} diff --git a/lib/std/special/compiler_rt/compareXf2.zig b/lib/std/special/compiler_rt/compareXf2.zig index 3253abe871..15e49e3cc1 100644 --- a/lib/std/special/compiler_rt/compareXf2.zig +++ b/lib/std/special/compiler_rt/compareXf2.zig @@ -183,11 +183,63 @@ pub fn __unordtf2(a: f128, b: f128) callconv(.C) i32 { return @call(.{ .modifier = .always_inline }, unordcmp, .{ f128, a, b }); } +// ARM EABI intrinsics + +pub fn __aeabi_fcmpeq(a: f32, b: f32) callconv(.AAPCS) i32 { + @setRuntimeSafety(false); + return @boolToInt(@call(.{ .modifier = .always_inline }, __eqsf2, .{ a, b }) == 0); +} + +pub fn __aeabi_fcmplt(a: f32, b: f32) callconv(.AAPCS) i32 { + @setRuntimeSafety(false); + return @boolToInt(@call(.{ .modifier = .always_inline }, __ltsf2, .{ a, b }) < 0); +} + +pub fn __aeabi_fcmple(a: f32, b: f32) callconv(.AAPCS) i32 { + @setRuntimeSafety(false); + return @boolToInt(@call(.{ .modifier = .always_inline }, __lesf2, .{ a, b }) <= 0); +} + +pub fn __aeabi_fcmpge(a: f32, b: f32) callconv(.AAPCS) i32 { + @setRuntimeSafety(false); + return @boolToInt(@call(.{ .modifier = .always_inline }, __gesf2, .{ a, b }) >= 0); +} + +pub fn __aeabi_fcmpgt(a: f32, b: f32) callconv(.AAPCS) i32 { + @setRuntimeSafety(false); + return @boolToInt(@call(.{ .modifier = .always_inline }, __gtsf2, .{ a, b }) > 0); +} + pub fn __aeabi_fcmpun(a: f32, b: f32) callconv(.AAPCS) i32 { @setRuntimeSafety(false); return @call(.{ .modifier = .always_inline }, __unordsf2, .{ a, b }); } +pub fn __aeabi_dcmpeq(a: f64, b: f64) callconv(.AAPCS) i32 { + @setRuntimeSafety(false); + return @boolToInt(@call(.{ .modifier = .always_inline }, __eqdf2, .{ a, b }) == 0); +} + +pub fn __aeabi_dcmplt(a: f64, b: f64) callconv(.AAPCS) i32 { + @setRuntimeSafety(false); + return @boolToInt(@call(.{ .modifier = .always_inline }, __ltdf2, .{ a, b }) < 0); +} + +pub fn __aeabi_dcmple(a: f64, b: f64) callconv(.AAPCS) i32 { + @setRuntimeSafety(false); + return @boolToInt(@call(.{ .modifier = .always_inline }, __ledf2, .{ a, b }) <= 0); +} + +pub fn __aeabi_dcmpge(a: f64, b: f64) callconv(.AAPCS) i32 { + @setRuntimeSafety(false); + return @boolToInt(@call(.{ .modifier = .always_inline }, __gedf2, .{ a, b }) >= 0); +} + +pub fn __aeabi_dcmpgt(a: f64, b: f64) callconv(.AAPCS) i32 { + @setRuntimeSafety(false); + return @boolToInt(@call(.{ .modifier = .always_inline }, __gtdf2, .{ a, b }) > 0); +} + pub fn __aeabi_dcmpun(a: f64, b: f64) callconv(.AAPCS) i32 { @setRuntimeSafety(false); return @call(.{ .modifier = .always_inline }, __unorddf2, .{ a, b }); |
