aboutsummaryrefslogtreecommitdiffstats
path: root/x86
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2022-01-21 11:48:06 +0100
committerXavier Leroy <xavier.leroy@college-de-france.fr>2022-02-07 11:52:22 +0100
commit87de3969856cf6a5eb5e1615ec817a015ed90d1c (patch)
tree8b526118ce6e2e9209f93d6886c36253644351f3 /x86
parenta882f78c069f7337dd9f4abff117d4df98ef38a6 (diff)
downloadcompcert-kvx-87de3969856cf6a5eb5e1615ec817a015ed90d1c.tar.gz
compcert-kvx-87de3969856cf6a5eb5e1615ec817a015ed90d1c.zip
Return second arg for float min/max on x86.
If both arguments are zero the second argument is returned independ from their sign. Bug 32640
Diffstat (limited to 'x86')
-rw-r--r--x86/Builtins1.v8
1 files changed, 4 insertions, 4 deletions
diff --git a/x86/Builtins1.v b/x86/Builtins1.v
index e5233ff5..7c77a488 100644
--- a/x86/Builtins1.v
+++ b/x86/Builtins1.v
@@ -42,14 +42,14 @@ Definition platform_builtin_sem (b: platform_builtin) : builtin_sem (sig_res (pl
| BI_fmin =>
mkbuiltin_n2t Tfloat Tfloat Tfloat
(fun f1 f2 => match Float.compare f1 f2 with
- | Some Eq | Some Lt => f1
- | Some Gt | None => f2
+ | Some Lt => f1
+ | Some Eq | Some Gt | None => f2
end)
| BI_fmax =>
mkbuiltin_n2t Tfloat Tfloat Tfloat
(fun f1 f2 => match Float.compare f1 f2 with
- | Some Eq | Some Gt => f1
- | Some Lt | None => f2
+ | Some Gt => f1
+ | Some Eq | Some Lt | None => f2
end)
end.