Commit f642817f authored by Xavier Leroy's avatar Xavier Leroy
Browse files

RISC-V port and assorted changes

This commits adds code generation for the RISC-V architecture, both in 32- and 64-bit modes.

The generated code was lightly tested using the simulator and cross-binutils from https://riscv.org/software-tools/

This port required the following additional changes:

- Integers: More properties about shrx

- SelectOp: now provides smart constructors for mulhs and mulhu

- SelectDiv, 32-bit integer division and modulus: implement constant propagation, use the new smart constructors mulhs and mulhu.

- Runtime library: if no asm implementation is provided, run the reference C implementation through CompCert.  Since CompCert rejects the definitions of names of special functions such as __i64_shl, the reference implementation now uses "i64_" names, e.g. "i64_shl", and a renaming "i64_ -> __i64_" is performed over the generated assembly file, before assembling and building the runtime library.

- test/: add SIMU make variable to run tests through a simulator

- test/regression/alignas.c: make sure _Alignas and _Alignof are not #define'd by C headers

commit da14495c01cf4f66a928c2feff5c53f09bde837f
Author: Xavier Leroy <xavier.leroy@inria.fr>
Date:   Thu Apr 13 17:36:10 2017 +0200

    RISC-V port, continued

    Now working on Asmgen.

commit 36f36eb3a5abfbb8805960443d087b6a83e86005
Author: Xavier Leroy <xavier.leroy@inria.fr>
Date:   Wed Apr 12 17:26:39 2017 +0200

    RISC-V port, first steps

    This port is based on Prashanth Mundkur's experimental RV32 port and brings it up to date with CompCert, and adds 64-bit support (RV64).  Work in progress.
parent 2fbdb0c4
......@@ -37,6 +37,9 @@ powerpc/SelectLong.v
arm/ConstpropOp.v
arm/SelectOp.v
arm/SelectLong.v
riscV/ConstpropOp.v
riscV/SelectOp.v
riscV/SelectLong.v
backend/SelectDiv.v
backend/SplitLong.v
cparser/Parser.v
......
- New port targeting the RISC-V architecture, in 32- and 64-bit modes.
- Removed the compilation of '.cm' files written in Cminor concrete syntax.
Bug fixing:
......
......@@ -194,6 +194,9 @@ Nondetfunction mul (e1: expr) (e2: expr) :=
| _, _ => Eop Omul (e1:::e2:::Enil)
end.
Definition mulhs (e1: expr) (e2: expr) := Eop Omulhs (e1 ::: e2 ::: Enil).
Definition mulhu (e1: expr) (e2: expr) := Eop Omulhu (e1 ::: e2 ::: Enil).
(** ** Bitwise and, or, xor *)
Nondetfunction andimm (n1: int) (e2: expr) :=
......
......@@ -337,6 +337,16 @@ Proof.
TrivialExists.
Qed.
Theorem eval_mulhs: binary_constructor_sound mulhs Val.mulhs.
Proof.
unfold mulhs; red; intros; TrivialExists.
Qed.
Theorem eval_mulhu: binary_constructor_sound mulhu Val.mulhu.
Proof.
unfold mulhu; red; intros; TrivialExists.
Qed.
Theorem eval_andimm:
forall n, unary_constructor_sound (andimm n) (fun x => Val.and x (Vint n)).
Proof.
......
......@@ -91,8 +91,8 @@ let elf_symbol oc symb =
let elf_symbol_offset oc (symb, ofs) =
elf_symbol oc symb;
let ofs = camlint_of_coqint ofs in
if ofs <> 0l then fprintf oc " + %ld" ofs
let ofs = camlint64_of_ptrofs ofs in
if ofs <> 0L then fprintf oc " + %Ld" ofs
(* Functions for fun and var info *)
let elf_print_fun_info oc name =
......@@ -142,6 +142,9 @@ let coqint oc n =
let coqint64 oc n =
fprintf oc "%Ld" (camlint64_of_coqint n)
let ptrofs oc n =
fprintf oc "%Ld" (camlint64_of_ptrofs n)
(** Programmer-supplied annotations (__builtin_annot). *)
let re_annot_param = Str.regexp "%%\\|%[1-9][0-9]*"
......
......@@ -19,6 +19,12 @@ Require Import Op CminorSel SelectOp SplitLong SelectLong.
Local Open Scope cminorsel_scope.
Definition is_intconst (e: expr) : option int :=
match e with
| Eop (Ointconst n) _ => Some n
| _ => None
end.
(** We try to turn divisions by a constant into a multiplication by
a pseudo-inverse of the divisor. The approach is described in
- Torbjörn Granlund, Peter L. Montgomery: "Division by Invariant
......@@ -101,7 +107,7 @@ Definition divlu_mul_params (d: Z) : option (Z * Z) :=
end.
Definition divu_mul (p: Z) (m: Z) :=
shruimm (Eop Omulhu (Eletvar O ::: Eop (Ointconst (Int.repr m)) Enil ::: Enil))
shruimm (mulhu (Eletvar O) (Eop (Ointconst (Int.repr m)) Enil))
(Int.repr p).
Definition divuimm (e1: expr) (n2: int) :=
......@@ -117,10 +123,14 @@ Definition divuimm (e1: expr) (n2: int) :=
end
end.
Nondetfunction divu (e1: expr) (e2: expr) :=
match e2 with
| Eop (Ointconst n2) Enil => divuimm e1 n2
| _ => divu_base e1 e2
Definition divu (e1: expr) (e2: expr) :=
match is_intconst e2, is_intconst e1 with
| Some n2, Some n1 =>
if Int.eq n2 Int.zero
then divu_base e1 e2
else Eop (Ointconst (Int.divu n1 n2)) Enil
| Some n2, _ => divuimm e1 n2
| _, _ => divu_base e1 e2
end.
Definition mod_from_div (equo: expr) (n: int) :=
......@@ -139,15 +149,19 @@ Definition moduimm (e1: expr) (n2: int) :=
end
end.
Nondetfunction modu (e1: expr) (e2: expr) :=
match e2 with
| Eop (Ointconst n2) Enil => moduimm e1 n2
| _ => modu_base e1 e2
Definition modu (e1: expr) (e2: expr) :=
match is_intconst e2, is_intconst e1 with
| Some n2, Some n1 =>
if Int.eq n2 Int.zero
then modu_base e1 e2
else Eop (Ointconst (Int.modu n1 n2)) Enil
| Some n2, _ => moduimm e1 n2
| _, _ => modu_base e1 e2
end.
Definition divs_mul (p: Z) (m: Z) :=
let e2 :=
Eop Omulhs (Eletvar O ::: Eop (Ointconst (Int.repr m)) Enil ::: Enil) in
mulhs (Eletvar O) (Eop (Ointconst (Int.repr m)) Enil) in
let e3 :=
if zlt m Int.half_modulus then e2 else add e2 (Eletvar O) in
add (shrimm e3 (Int.repr p))
......@@ -169,10 +183,14 @@ Definition divsimm (e1: expr) (n2: int) :=
end
end.
Nondetfunction divs (e1: expr) (e2: expr) :=
match e2 with
| Eop (Ointconst n2) Enil => divsimm e1 n2
| _ => divs_base e1 e2
Definition divs (e1: expr) (e2: expr) :=
match is_intconst e2, is_intconst e1 with
| Some n2, Some n1 =>
if Int.eq n2 Int.zero
then divs_base e1 e2
else Eop (Ointconst (Int.divs n1 n2)) Enil
| Some n2, _ => divsimm e1 n2
| _, _ => divs_base e1 e2
end.
Definition modsimm (e1: expr) (n2: int) :=
......@@ -191,10 +209,14 @@ Definition modsimm (e1: expr) (n2: int) :=
end
end.
Nondetfunction mods (e1: expr) (e2: expr) :=
match e2 with
| Eop (Ointconst n2) Enil => modsimm e1 n2
| _ => mods_base e1 e2
Definition mods (e1: expr) (e2: expr) :=
match is_intconst e2, is_intconst e1 with
| Some n2, Some n1 =>
if Int.eq n2 Int.zero
then mods_base e1 e2
else Eop (Ointconst (Int.mods n1 n2)) Enil
| Some n2, _ => modsimm e1 n2
| _, _ => mods_base e1 e2
end.
(** 64-bit integer divisions *)
......
......@@ -488,6 +488,14 @@ Variable sp: val.
Variable e: env.
Variable m: mem.
Lemma is_intconst_sound:
forall v a n le,
is_intconst a = Some n -> eval_expr ge sp e m le a v -> v = Vint n.
Proof with (try discriminate).
intros. unfold is_intconst in *.
destruct a... destruct o... inv H. inv H0. destruct vl; inv H5. auto.
Qed.
Lemma eval_divu_mul:
forall le x y p M,
divu_mul_params (Int.unsigned y) = Some(p, M) ->
......@@ -495,12 +503,10 @@ Lemma eval_divu_mul:
eval_expr ge sp e m le (divu_mul p M) (Vint (Int.divu x y)).
Proof.
intros. unfold divu_mul. exploit (divu_mul_shift x); eauto. intros [A B].
assert (eval_expr ge sp e m le
(Eop Omulhu (Eletvar 0 ::: Eop (Ointconst (Int.repr M)) Enil ::: Enil))
(Vint (Int.mulhu x (Int.repr M)))).
{ EvalOp. econstructor. econstructor; eauto. econstructor. EvalOp. simpl; reflexivity. constructor.
auto. }
exploit eval_shruimm. eexact H1. instantiate (1 := Int.repr p).
assert (C: eval_expr ge sp e m le (Eletvar 0) (Vint x)) by (apply eval_Eletvar; eauto).
assert (D: eval_expr ge sp e m le (Eop (Ointconst (Int.repr M)) Enil) (Vint (Int.repr M))) by EvalOp.
exploit eval_mulhu. eexact C. eexact D. intros (v & E & F). simpl in F. inv F.
exploit eval_shruimm. eexact E. instantiate (1 := Int.repr p).
intros [v [P Q]]. simpl in Q.
replace (Int.ltu (Int.repr p) Int.iwordsize) with true in Q.
inv Q. rewrite B. auto.
......@@ -537,8 +543,15 @@ Theorem eval_divu:
Val.divu x y = Some z ->
exists v, eval_expr ge sp e m le (divu a b) v /\ Val.lessdef z v.
Proof.
unfold divu; intros until b. destruct (divu_match b); intros.
- inv H0. inv H5. simpl in H7. inv H7. eapply eval_divuimm; eauto.
unfold divu; intros.
destruct (is_intconst b) as [n2|] eqn:B.
- exploit is_intconst_sound; eauto. intros EB; clear B.
destruct (is_intconst a) as [n1|] eqn:A.
+ exploit is_intconst_sound; eauto. intros EA; clear A.
destruct (Int.eq n2 Int.zero) eqn:Z. eapply eval_divu_base; eauto.
subst. simpl in H1. rewrite Z in H1; inv H1.
TrivialExists.
+ subst. eapply eval_divuimm; eauto.
- eapply eval_divu_base; eauto.
Qed.
......@@ -585,8 +598,15 @@ Theorem eval_modu:
Val.modu x y = Some z ->
exists v, eval_expr ge sp e m le (modu a b) v /\ Val.lessdef z v.
Proof.
unfold modu; intros until b. destruct (modu_match b); intros.
- inv H0. inv H5. simpl in H7. inv H7. eapply eval_moduimm; eauto.
unfold modu; intros.
destruct (is_intconst b) as [n2|] eqn:B.
- exploit is_intconst_sound; eauto. intros EB; clear B.
destruct (is_intconst a) as [n1|] eqn:A.
+ exploit is_intconst_sound; eauto. intros EA; clear A.
destruct (Int.eq n2 Int.zero) eqn:Z. eapply eval_modu_base; eauto.
subst. simpl in H1. rewrite Z in H1; inv H1.
TrivialExists.
+ subst. eapply eval_moduimm; eauto.
- eapply eval_modu_base; eauto.
Qed.
......@@ -597,14 +617,10 @@ Lemma eval_divs_mul:
eval_expr ge sp e m le (divs_mul p M) (Vint (Int.divs x y)).
Proof.
intros. unfold divs_mul.
assert (V: eval_expr ge sp e m le (Eletvar O) (Vint x)).
{ constructor; auto. }
assert (X: eval_expr ge sp e m le
(Eop Omulhs (Eletvar 0 ::: Eop (Ointconst (Int.repr M)) Enil ::: Enil))
(Vint (Int.mulhs x (Int.repr M)))).
{ EvalOp. econstructor. eauto. econstructor. EvalOp. simpl; reflexivity. constructor.
auto. }
exploit eval_shruimm. eexact V. instantiate (1 := Int.repr (Int.zwordsize - 1)).
assert (C: eval_expr ge sp e m le (Eletvar 0) (Vint x)) by (apply eval_Eletvar; eauto).
assert (D: eval_expr ge sp e m le (Eop (Ointconst (Int.repr M)) Enil) (Vint (Int.repr M))) by EvalOp.
exploit eval_mulhs. eexact C. eexact D. intros (v & X & F). simpl in F; inv F.
exploit eval_shruimm. eexact C. instantiate (1 := Int.repr (Int.zwordsize - 1)).
intros [v1 [Y LD]]. simpl in LD.
change (Int.ltu (Int.repr 31) Int.iwordsize) with true in LD.
simpl in LD. inv LD.
......@@ -619,7 +635,7 @@ Proof.
simpl in LD. inv LD.
rewrite B. exact W.
- exploit (divs_mul_shift_2 x); eauto. intros [A B].
exploit eval_add. eexact X. eexact V. intros [v1 [Z LD]].
exploit eval_add. eexact X. eexact C. intros [v1 [Z LD]].
simpl in LD. inv LD.
exploit eval_shrimm. eexact Z. instantiate (1 := Int.repr p). intros [v1 [U LD]].
simpl in LD. rewrite RANGE in LD by auto. inv LD.
......@@ -657,8 +673,16 @@ Theorem eval_divs:
Val.divs x y = Some z ->
exists v, eval_expr ge sp e m le (divs a b) v /\ Val.lessdef z v.
Proof.
unfold divs; intros until b. destruct (divs_match b); intros.
- inv H0. inv H5. simpl in H7. inv H7. eapply eval_divsimm; eauto.
unfold divs; intros.
destruct (is_intconst b) as [n2|] eqn:B.
- exploit is_intconst_sound; eauto. intros EB; clear B.
destruct (is_intconst a) as [n1|] eqn:A.
+ exploit is_intconst_sound; eauto. intros EA; clear A.
destruct (Int.eq n2 Int.zero) eqn:Z. eapply eval_divs_base; eauto.
subst. simpl in H1.
destruct (Int.eq n2 Int.zero || Int.eq n1 (Int.repr Int.min_signed) && Int.eq n2 Int.mone); inv H1.
TrivialExists.
+ subst. eapply eval_divsimm; eauto.
- eapply eval_divs_base; eauto.
Qed.
......@@ -700,8 +724,16 @@ Theorem eval_mods:
Val.mods x y = Some z ->
exists v, eval_expr ge sp e m le (mods a b) v /\ Val.lessdef z v.
Proof.
unfold mods; intros until b. destruct (mods_match b); intros.
- inv H0. inv H5. simpl in H7. inv H7. eapply eval_modsimm; eauto.
unfold mods; intros.
destruct (is_intconst b) as [n2|] eqn:B.
- exploit is_intconst_sound; eauto. intros EB; clear B.
destruct (is_intconst a) as [n1|] eqn:A.
+ exploit is_intconst_sound; eauto. intros EA; clear A.
destruct (Int.eq n2 Int.zero) eqn:Z. eapply eval_mods_base; eauto.
subst. simpl in H1.
destruct (Int.eq n2 Int.zero || Int.eq n1 (Int.repr Int.min_signed) && Int.eq n2 Int.mone); inv H1.
TrivialExists.
+ subst. eapply eval_modsimm; eauto.
- eapply eval_mods_base; eauto.
Qed.
......
......@@ -1966,6 +1966,22 @@ Proof.
rewrite LTU; auto with va.
Qed.
(** Pointer operations *)
Definition offset_ptr (v: aval) (n: ptrofs) :=
match v with
| Ptr p => Ptr (padd p n)
| Ifptr p => Ifptr (padd p n)
| _ => ntop1 v
end.
Lemma offset_ptr_sound:
forall v x n, vmatch v x -> vmatch (Val.offset_ptr v n) (offset_ptr x n).
Proof.
intros. unfold Val.offset_ptr, offset_ptr.
inv H; constructor; apply padd_sound; assumption.
Qed.
(** Floating-point arithmetic operations *)
Definition negf := unop_float Float.neg.
......@@ -4574,6 +4590,7 @@ Hint Resolve cnot_sound symbol_address_sound
negl_sound addl_sound subl_sound
mull_sound mullhs_sound mullhu_sound
divls_sound divlu_sound modls_sound modlu_sound shrxl_sound
offset_ptr_sound
negf_sound absf_sound
addf_sound subf_sound mulf_sound divf_sound
negfs_sound absfs_sound
......
......@@ -131,6 +131,10 @@ case "$target" in
arch="powerpc"; model="ppc64"; endianness="big"; bitsize=32;;
e5500-*)
arch="powerpc"; model="e5500"; endianness="big"; bitsize=32;;
rv32-*)
arch="riscV"; model="32"; endianness="little"; bitsize=32;;
rv64-*)
arch="riscV"; model="64"; endianness="little"; bitsize=64;;
manual)
;;
"")
......@@ -366,6 +370,29 @@ if test "$arch" = "x86" -a "$bitsize" = "64"; then
esac
fi
#
# RISC-V Target Configuration
#
if test "$arch" = "riscV"; then
if test "$model" = "64"; then
model_options="-march=rv64imafd -mabi=lp64d"
else
model_options="-march=rv32imafd -mabi=ilp32d"
fi
abi="standard"
casm="${toolprefix}gcc"
casm_options="$model_options -c"
cc="${toolprefix}gcc $model_options"
clinker="${toolprefix}gcc"
clinker_options="$model_options"
cprepro="${toolprefix}gcc"
cprepro_options="$model_options -std=c99 -U__GNUC__ -E"
libmath="-lm"
struct_passing="ref-callee" # wrong!
struct_return="ref" # to check!
system="linux"
fi
#
# Finalize Target Configuration
#
......
......@@ -180,6 +180,11 @@ let arm_bigendian =
{ arm_littleendian with bigendian = true;
bitfields_msb_first = true }
let rv32 =
{ ilp32ll64 with name = "rv32" }
let rv64 =
{ i32lpll64 with name = "rv64" }
(* Add GCC extensions re: sizeof and alignof *)
let gcc_extensions c =
......
......@@ -65,6 +65,8 @@ val ppc_32_bigendian : t
val ppc_32_diab_bigendian : t
val arm_littleendian : t
val arm_bigendian : t
val rv32 : t
val rv64 : t
val gcc_extensions : t -> t
val compcert_interpreter : t -> t
......@@ -123,7 +123,7 @@ let get_bool_config key =
let arch =
match get_config_string "arch" with
| "powerpc"|"arm"|"x86" as a -> a
| "powerpc"|"arm"|"x86"|"riscV" as a -> a
| v -> bad_config "arch" [v]
let model = get_config_string "model"
let abi = get_config_string "abi"
......
......@@ -461,6 +461,9 @@ let _ =
if Configuration.abi = "macosx"
then Machine.x86_32_macosx
else Machine.x86_32
| "riscV" -> if Configuration.model = "64"
then Machine.rv64
else Machine.rv32
| _ -> assert false
end;
Builtins.set C2C.builtins;
......
......@@ -272,6 +272,8 @@ let coqint_of_camlint : int32 -> Integers.Int.int = Z.of_uint32
let camlint64_of_coqint : Integers.Int64.int -> int64 = Z.to_int64
let coqint_of_camlint64 : int64 -> Integers.Int64.int = Z.of_uint64
(* interpret the int64 as unsigned so that result Z is in range for int *)
let camlint64_of_ptrofs : Integers.Ptrofs.int -> int64 =
fun x -> Z.to_int64 (Integers.Ptrofs.signed x)
(* Atoms (positive integers representing strings) *)
......
......@@ -796,6 +796,12 @@ Proof.
unfold signed. rewrite unsigned_zero. apply zlt_true. generalize half_modulus_pos; omega.
Qed.
Theorem signed_one: zwordsize > 1 -> signed one = 1.
Proof.
intros. unfold signed. rewrite unsigned_one. apply zlt_true.
change 1 with (two_p 0). rewrite half_modulus_power. apply two_p_monotone_strict. omega.
Qed.
Theorem signed_mone: signed mone = -1.
Proof.
unfold signed. rewrite unsigned_mone.
......@@ -1844,6 +1850,15 @@ Proof.
destruct (testbit x i); destruct (testbit y i); reflexivity || discriminate.
Qed.
Theorem xor_is_zero: forall x y, eq (xor x y) zero = eq x y.
Proof.
intros. predSpec eq eq_spec (xor x y) zero.
- apply xor_zero_equal in H. subst y. rewrite eq_true; auto.
- predSpec eq eq_spec x y.
+ elim H; subst y; apply xor_idem.
+ auto.
Qed.
Theorem and_xor_distrib:
forall x y z,
and x (xor y z) = xor (and x y) (and x z).
......@@ -2933,6 +2948,13 @@ Proof.
- apply Zquot_Zdiv_pos; omega.
Qed.
Theorem shrx_zero:
forall x, zwordsize > 1 -> shrx x zero = x.
Proof.
intros. unfold shrx. rewrite shl_zero. unfold divs. rewrite signed_one by auto.
rewrite Z.quot_1_r. apply repr_signed.
Qed.
Theorem shrx_shr:
forall x y,
ltu y (repr (zwordsize - 1)) = true ->
......@@ -4080,9 +4102,7 @@ Qed.
Theorem shrx'_zero:
forall x, shrx' x Int.zero = x.
Proof.
intros. unfold shrx'. rewrite shl'_one_two_p. unfold divs.
change (signed (repr (two_p (Int.unsigned Int.zero)))) with 1.
rewrite Z.quot_1_r. apply repr_signed.
intros. change (shrx' x Int.zero) with (shrx x zero). apply shrx_zero. compute; auto.
Qed.
Theorem shrx'_shr_2:
......
......@@ -234,6 +234,9 @@ Nondetfunction mul (e1: expr) (e2: expr) :=
| _, _ => Eop Omul (e1:::e2:::Enil)
end.
Definition mulhs (e1: expr) (e2: expr) := Eop Omulhs (e1 ::: e2 ::: Enil).
Definition mulhu (e1: expr) (e2: expr) := Eop Omulhu (e1 ::: e2 ::: Enil).
(** ** Bitwise and, or, xor *)
Nondetfunction andimm (n1: int) (e2: expr) :=
......
......@@ -367,6 +367,16 @@ Proof.
TrivialExists.
Qed.
Theorem eval_mulhs: binary_constructor_sound mulhs Val.mulhs.
Proof.
unfold mulhs; red; intros; TrivialExists.
Qed.
Theorem eval_mulhu: binary_constructor_sound mulhu Val.mulhu.
Proof.
unfold mulhu; red; intros; TrivialExists.
Qed.
Theorem eval_andimm:
forall n, unary_constructor_sound (andimm n) (fun x => Val.and x (Vint n)).
Proof.
......
(* *********************************************************************)
(* *)
(* The Compcert verified compiler *)
(* *)
(* Xavier Leroy, INRIA Paris *)
(* Jacques-Henri Jourdan, INRIA Paris *)
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU General Public License as published by *)
(* the Free Software Foundation, either version 2 of the License, or *)
(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
(** Architecture-dependent parameters for RISC-V *)
Require Import ZArith.
Require Import Fappli_IEEE.
Require Import Fappli_IEEE_bits.
Parameter ptr64 : bool.
Definition big_endian := false.
Definition align_int64 := 8%Z.
Definition align_float64 := 8%Z.
Definition splitlong := negb ptr64.
Lemma splitlong_ptr32: splitlong = true -> ptr64 = false.
Proof.
unfold splitlong. destruct ptr64; simpl; congruence.
Qed.
(** Section 7.3: "Except when otherwise stated, if the result of a
floating-point operation is NaN, it is the canonical NaN. The
canonical NaN has a positive sign and all significand bits clear
except the MSB, a.k.a. the quiet bit."
We need to extend the [choose_binop_pl] functions to account for
this case. *)
Program Definition default_pl_64 : bool * nan_pl 53 :=
(false, iter_nat 51 _ xO xH).
Definition choose_binop_pl_64 (s1: bool) (pl1: nan_pl 53) (s2: bool) (pl2: nan_pl 53) :=
false. (**r always choose first NaN *)
Program Definition default_pl_32 : bool * nan_pl 24 :=
(false, iter_nat 22 _ xO xH).
Definition choose_binop_pl_32 (s1: bool) (pl1: nan_pl 24) (s2: bool) (pl2: nan_pl 24) :=
false. (**r always choose first NaN *)
Definition float_of_single_preserves_sNaN := false.
Global Opaque ptr64 big_endian splitlong
default_pl_64 choose_binop_pl_64
default_pl_32 choose_binop_pl_32
float_of_single_preserves_sNaN.
(** Whether to generate position-independent code or not *)
Parameter pic_code: unit -> bool.
This diff is collapsed.
(* *********************************************************************)
(* *)
(* The Compcert verified compiler *)
(* *)
(* Bernhard Schommer, AbsInt Angewandte Informatik GmbH *)
(* *)
(* AbsInt Angewandte Informatik GmbH. All rights reserved. This file *)
(* is distributed under the terms of the INRIA Non-Commercial *)
(* License Agreement. *)
(* *)
(* *********************************************************************)
(* Simple functions to serialize RISC-V Asm to JSON *)
(* Dummy function *)
let p_program oc prog =
()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment