@@ -19,47 +19,15 @@ Require Import String Coqlib.
19
19
Require Import AST Integers Floats Values.
20
20
Require Import Builtins0.
21
21
22
- Inductive platform_builtin : Type :=
23
- | BI_fmin
24
- | BI_fmax.
22
+ Inductive platform_builtin : Type := .
25
23
26
24
Local Open Scope string_scope.
27
25
28
26
Definition platform_builtin_table : list (string * platform_builtin) :=
29
- ("__builtin_fmin", BI_fmin)
30
- :: ("__builtin_fmax", BI_fmax)
31
- :: nil.
27
+ nil.
32
28
33
29
Definition platform_builtin_sig (b: platform_builtin) : signature :=
34
- match b with
35
- | BI_fmin | BI_fmax =>
36
- mksignature (Tfloat :: Tfloat :: nil) Tfloat cc_default
37
- end .
38
-
39
- (* Canonical NaN as defined in the RISC-V ISA, all expontent bits one, sign bit
40
- zero and quiet bit one. *)
41
- Definition canonical_nan := Float.of_bits (Int64.repr 9221120237041090560).
42
-
43
- (* NaN handling as described for fmin/fmax by the RISC-V Isa. If one of the
44
- parameters is NaN, the other one is returned. Otherwise the canonical NaN
45
- value is returned. *)
46
- Definition nan_handling (f1 f2: float) : float :=
47
- if negb (Binary.is_nan _ _ f1) then f1
48
- else if negb (Binary.is_nan _ _ f2) then f2
49
- else canonical_nan.
30
+ match b with end .
50
31
51
32
Definition platform_builtin_sem (b: platform_builtin) : builtin_sem (sig_res (platform_builtin_sig b)) :=
52
- match b with
53
- | BI_fmin =>
54
- mkbuiltin_n2t Tfloat Tfloat Tfloat
55
- (fun f1 f2 => match Float.compare f1 f2 with
56
- | Some Eq | Some Lt => f1
57
- | Some Gt | None => nan_handling f1 f2
58
- end )
59
- | BI_fmax =>
60
- mkbuiltin_n2t Tfloat Tfloat Tfloat
61
- (fun f1 f2 => match Float.compare f1 f2 with
62
- | Some Eq | Some Gt => f1
63
- | Some Lt | None => nan_handling f1 f2
64
- end )
65
- end .
33
+ match b with end .
0 commit comments