Skip to content

Commit 99aecac

Browse files
committed
handle minimumf128/maximumf128 in get_simple_function_f128_2args
1 parent 25a7f23 commit 99aecac

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

src/intrinsic/mod.rs

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,6 @@ fn get_simple_function<'gcc, 'tcx>(
115115
];
116116
(cx.double_type, parameters, "fminimum")
117117
}
118-
sym::minimumf128 => {
119-
let f128_type = cx.type_f128();
120-
// GCC doesn't have the intrinsic we want so we use the compiler-builtins one
121-
// https://docs.rs/compiler_builtins/latest/compiler_builtins/math/full_availability/fn.fminimumf128.html
122-
let parameters = [
123-
cx.context.new_parameter(None, f128_type, "a"),
124-
cx.context.new_parameter(None, f128_type, "b"),
125-
];
126-
(f128_type, parameters, "fminimumf128")
127-
}
128118
sym::maximumf32 => {
129119
let parameters = [
130120
cx.context.new_parameter(None, cx.float_type, "a"),
@@ -139,16 +129,6 @@ fn get_simple_function<'gcc, 'tcx>(
139129
];
140130
(cx.double_type, parameters, "fmaximum")
141131
}
142-
sym::maximumf128 => {
143-
let f128_type = cx.type_f128();
144-
// GCC doesn't have the intrinsic we want so we use the compiler-builtins one
145-
// https://docs.rs/compiler_builtins/latest/compiler_builtins/math/full_availability/fn.fmaximumf128.html
146-
let parameters = [
147-
cx.context.new_parameter(None, f128_type, "a"),
148-
cx.context.new_parameter(None, f128_type, "b"),
149-
];
150-
(f128_type, parameters, "fmaximumf128")
151-
}
152132
_ => return None,
153133
};
154134
Some(cx.context.new_function(
@@ -200,6 +180,11 @@ fn get_simple_function_f128_2args<'gcc, 'tcx>(
200180

201181
let f128_type = cx.type_f128();
202182
let func_name = match name {
183+
// GCC doesn't have the intrinsic we want so we use the compiler-builtins one
184+
// https://docs.rs/compiler_builtins/latest/compiler_builtins/math/full_availability/fn.fmaximumf128.html
185+
// https://docs.rs/compiler_builtins/latest/compiler_builtins/math/full_availability/fn.fminimumf128.html
186+
sym::maximumf128 => "fmaximumf128",
187+
sym::minimumf128 => "fminimumf128",
203188
sym::maxnumf128 => "fmaxf128",
204189
sym::minnumf128 => "fminf128",
205190
sym::copysignf128 => "copysignf128",

0 commit comments

Comments
 (0)