statement stringlengths 1 2.09k | proof stringlengths 0 22.1k | type stringclasses 25
values | symbolic_name stringlengths 1 49 | library stringclasses 14
values | filename stringclasses 212
values | imports listlengths 0 63 | deps listlengths 0 64 | docstring stringlengths 0 1.82k | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
platform_builtin_table : list (string * platform_builtin) | :=
nil. | Definition | platform_builtin_table | aarch64 | aarch64/Builtins1.v | [
"Coq",
"String",
"Coqlib",
"AST",
"Integers",
"Floats",
"Values",
"Builtins0"
] | [
"platform_builtin",
"string"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
platform_builtin_sig (b: platform_builtin) : signature | :=
match b with end. | Definition | platform_builtin_sig | aarch64 | aarch64/Builtins1.v | [
"Coq",
"String",
"Coqlib",
"AST",
"Integers",
"Floats",
"Values",
"Builtins0"
] | [
"platform_builtin",
"signature"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
platform_builtin_sem (b: platform_builtin) : builtin_sem (sig_res (platform_builtin_sig b)) | :=
match b with end. | Definition | platform_builtin_sem | aarch64 | aarch64/Builtins1.v | [
"Coq",
"String",
"Coqlib",
"AST",
"Integers",
"Floats",
"Values",
"Builtins0"
] | [
"builtin_sem",
"platform_builtin",
"platform_builtin_sig"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
eq_platform_builtin: forall (x y: platform_builtin), {x=y} + {x<>y}. | Proof.
intros. destruct x.
Defined. | Definition | eq_platform_builtin | aarch64 | aarch64/Builtins1.v | [
"Coq",
"String",
"Coqlib",
"AST",
"Integers",
"Floats",
"Values",
"Builtins0"
] | [
"platform_builtin"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_compimm_ne_0 (x: valnum) : option(condition * list valnum) | :=
match get x with
| Some(Op (Ocmp c) ys) => Some (c, ys)
| Some(Op (Oxorimm n) ys) =>
if Int.eq n (Int.zero_ext 12 n) then Some (Ccompimm Cne n, ys) else None
| _ => None
end. | Function | combine_compimm_ne_0 | aarch64 | aarch64/CombineOp.v | [
"Coqlib",
"AST",
"Integers",
"Op",
"CSEdomain"
] | [
"condition",
"eq",
"get",
"valnum",
"zero_ext"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_compimm_eq_0 (x: valnum) : option(condition * list valnum) | :=
match get x with
| Some(Op (Ocmp c) ys) => Some (negate_condition c, ys)
| Some(Op (Oxorimm n) ys) =>
if Int.eq n (Int.zero_ext 12 n) then Some (Ccompimm Ceq n, ys) else None
| _ => None
end. | Function | combine_compimm_eq_0 | aarch64 | aarch64/CombineOp.v | [
"Coqlib",
"AST",
"Integers",
"Op",
"CSEdomain"
] | [
"condition",
"eq",
"get",
"negate_condition",
"valnum",
"zero_ext"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_compimm_eq_1 (x: valnum) : option(condition * list valnum) | :=
match get x with
| Some(Op (Ocmp c) ys) => Some (c, ys)
| _ => None
end. | Function | combine_compimm_eq_1 | aarch64 | aarch64/CombineOp.v | [
"Coqlib",
"AST",
"Integers",
"Op",
"CSEdomain"
] | [
"condition",
"get",
"valnum"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_compimm_ne_1 (x: valnum) : option(condition * list valnum) | :=
match get x with
| Some(Op (Ocmp c) ys) => Some (negate_condition c, ys)
| _ => None
end. | Function | combine_compimm_ne_1 | aarch64 | aarch64/CombineOp.v | [
"Coqlib",
"AST",
"Integers",
"Op",
"CSEdomain"
] | [
"condition",
"get",
"negate_condition",
"valnum"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_cond (cond: condition) (args: list valnum) : option(condition * list valnum) | :=
match cond, args with
| Ccompimm Cne n, x::nil =>
if Int.eq_dec n Int.zero then combine_compimm_ne_0 x
else if Int.eq_dec n Int.one then combine_compimm_ne_1 x
else None
| Ccompimm Ceq n, x::nil =>
if Int.eq_dec n Int.zero then combine_compimm_eq_0 x
else if Int.eq_dec n Int.one t... | Function | combine_cond | aarch64 | aarch64/CombineOp.v | [
"Coqlib",
"AST",
"Integers",
"Op",
"CSEdomain"
] | [
"combine_compimm_eq_0",
"combine_compimm_eq_1",
"combine_compimm_ne_0",
"combine_compimm_ne_1",
"condition",
"eq_dec",
"one",
"valnum",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_cond' (cond: condition) (args: list valnum) : option bool | :=
match cond, args with
| (Ccomp c | Ccompu c | Ccompl c | Ccomplu c), x :: y :: nil => combine_comparison c x y
| _, _ => None
end. | Definition | combine_cond' | aarch64 | aarch64/CombineOp.v | [
"Coqlib",
"AST",
"Integers",
"Op",
"CSEdomain"
] | [
"combine_comparison",
"condition",
"valnum"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_addr (addr: addressing) (args: list valnum) : option(addressing * list valnum) | :=
match addr, args with
| Aindexed n, x::nil =>
match get x with
| Some(Op (Oaddlimm m) ys) =>
Some(Aindexed (Int64.add m n), ys)
| _ => None
end
| _, _ => None
end. | Function | combine_addr | aarch64 | aarch64/CombineOp.v | [
"Coqlib",
"AST",
"Integers",
"Op",
"CSEdomain"
] | [
"add",
"addressing",
"get",
"valnum"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_op (op: operation) (args: list valnum) : option(operation * list valnum) | :=
match op, args with
| Oaddimm n, x :: nil =>
match get x with
| Some(Op (Oaddimm m) ys) => Some(Oaddimm (Int.add m n), ys)
| _ => None
end
| Oandimm n, x :: nil =>
match get x with
| Some(Op (Oandimm m) ys) =>
Some(let p := Int.and m n in
if Int.eq p... | Function | combine_op | aarch64 | aarch64/CombineOp.v | [
"Coqlib",
"AST",
"Integers",
"Op",
"CSEdomain"
] | [
"add",
"and",
"combine_cond",
"combine_cond'",
"eq",
"eq_valnum",
"get",
"one",
"operation",
"or",
"valnum",
"xor",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
get_sound: forall v rhs, get v = Some rhs -> rhs_eval_to valu ge sp m rhs (valu v). | Hypothesis | get_sound | aarch64 | aarch64/CombineOpproof.v | [
"Coq",
"FunInd",
"Coqlib",
"AST",
"Integers",
"Values",
"Memory",
"Op",
"Registers",
"RTL",
"CSEdomain",
"CombineOp"
] | [
"ge",
"get",
"rhs",
"rhs_eval_to"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | ||
get_op_sound:
forall v op vl, get v = Some (Op op vl) -> eval_operation ge sp op (map valu vl) m = Some (valu v). | Proof.
intros. exploit get_sound; eauto. intros REV; inv REV; auto.
Qed. | Lemma | get_op_sound | aarch64 | aarch64/CombineOpproof.v | [
"Coq",
"FunInd",
"Coqlib",
"AST",
"Integers",
"Values",
"Memory",
"Op",
"Registers",
"RTL",
"CSEdomain",
"CombineOp"
] | [
"eval_operation",
"exploit",
"ge",
"get",
"get_sound",
"inv",
"map"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
UseGetSound | :=
match goal with
| [ H: get _ = Some _ |- _ ] =>
let x := fresh "EQ" in (generalize (get_op_sound _ _ _ H); intros x; simpl in x; FuncInv)
end. | Ltac | UseGetSound | aarch64 | aarch64/CombineOpproof.v | [
"Coq",
"FunInd",
"Coqlib",
"AST",
"Integers",
"Values",
"Memory",
"Op",
"Registers",
"RTL",
"CSEdomain",
"CombineOp"
] | [
"FuncInv",
"get",
"get_op_sound"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_compimm_ne_0_sound:
forall x cond args,
combine_compimm_ne_0 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Cne (valu x) (Vint Int.zero) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Cne (valu x) (Vint Int.zero). | Proof.
intros until args. functional induction (combine_compimm_ne_0 get x); intros EQ; inv EQ.
(* of cmp *)
UseGetSound. rewrite <- H.
destruct (eval_condition cond (map valu args) m); simpl; auto. destruct b; auto.
(* of xorimm *)
UseGetSound. rewrite <- H.
destruct v; simpl; auto. rewrite Int.xor_is_ze... | Lemma | combine_compimm_ne_0_sound | aarch64 | aarch64/CombineOpproof.v | [
"Coq",
"FunInd",
"Coqlib",
"AST",
"Integers",
"Values",
"Memory",
"Op",
"Registers",
"RTL",
"CSEdomain",
"CombineOp"
] | [
"UseGetSound",
"cmp_bool",
"cmpu_bool",
"combine_compimm_ne_0",
"eval_condition",
"get",
"inv",
"map",
"valid_pointer",
"xor_is_zero",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_compimm_eq_0_sound:
forall x cond args,
combine_compimm_eq_0 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Ceq (valu x) (Vint Int.zero) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Ceq (valu x) (Vint Int.zero). | Proof.
intros until args. functional induction (combine_compimm_eq_0 get x); intros EQ; inv EQ.
(* of cmp *)
UseGetSound. rewrite <- H.
rewrite eval_negate_condition.
destruct (eval_condition c (map valu args) m); simpl; auto. destruct b; auto.
(* of xorimm *)
UseGetSound. rewrite <- H.
destruct v; simp... | Lemma | combine_compimm_eq_0_sound | aarch64 | aarch64/CombineOpproof.v | [
"Coq",
"FunInd",
"Coqlib",
"AST",
"Integers",
"Values",
"Memory",
"Op",
"Registers",
"RTL",
"CSEdomain",
"CombineOp"
] | [
"UseGetSound",
"cmp_bool",
"cmpu_bool",
"combine_compimm_eq_0",
"eval_condition",
"eval_negate_condition",
"get",
"inv",
"map",
"valid_pointer",
"xor_is_zero",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_compimm_eq_1_sound:
forall x cond args,
combine_compimm_eq_1 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Ceq (valu x) (Vint Int.one) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Ceq (valu x) (Vint Int.one). | Proof.
intros until args. functional induction (combine_compimm_eq_1 get x); intros EQ; inv EQ.
(* of cmp *)
UseGetSound. rewrite <- H.
destruct (eval_condition cond (map valu args) m); simpl; auto. destruct b; auto.
Qed. | Lemma | combine_compimm_eq_1_sound | aarch64 | aarch64/CombineOpproof.v | [
"Coq",
"FunInd",
"Coqlib",
"AST",
"Integers",
"Values",
"Memory",
"Op",
"Registers",
"RTL",
"CSEdomain",
"CombineOp"
] | [
"UseGetSound",
"cmp_bool",
"cmpu_bool",
"combine_compimm_eq_1",
"eval_condition",
"get",
"inv",
"map",
"one",
"valid_pointer"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_compimm_ne_1_sound:
forall x cond args,
combine_compimm_ne_1 get x = Some(cond, args) ->
eval_condition cond (map valu args) m = Val.cmp_bool Cne (valu x) (Vint Int.one) /\
eval_condition cond (map valu args) m = Val.cmpu_bool (Mem.valid_pointer m) Cne (valu x) (Vint Int.one). | Proof.
intros until args. functional induction (combine_compimm_ne_1 get x); intros EQ; inv EQ.
(* of cmp *)
UseGetSound. rewrite <- H.
rewrite eval_negate_condition.
destruct (eval_condition c (map valu args) m); simpl; auto. destruct b; auto.
Qed. | Lemma | combine_compimm_ne_1_sound | aarch64 | aarch64/CombineOpproof.v | [
"Coq",
"FunInd",
"Coqlib",
"AST",
"Integers",
"Values",
"Memory",
"Op",
"Registers",
"RTL",
"CSEdomain",
"CombineOp"
] | [
"UseGetSound",
"cmp_bool",
"cmpu_bool",
"combine_compimm_ne_1",
"eval_condition",
"eval_negate_condition",
"get",
"inv",
"map",
"one",
"valid_pointer"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_cond_sound:
forall cond args cond' args',
combine_cond get cond args = Some(cond', args') ->
eval_condition cond' (map valu args') m = eval_condition cond (map valu args) m. | Proof.
intros. functional inversion H; subst.
(* compimm ne zero *)
- simpl; eapply combine_compimm_ne_0_sound; eauto.
(* compimm ne one *)
- simpl; eapply combine_compimm_ne_1_sound; eauto.
(* compimm eq zero *)
- simpl; eapply combine_compimm_eq_0_sound; eauto.
(* compimm eq one *)
- simpl; eapply c... | Theorem | combine_cond_sound | aarch64 | aarch64/CombineOpproof.v | [
"Coq",
"FunInd",
"Coqlib",
"AST",
"Integers",
"Values",
"Memory",
"Op",
"Registers",
"RTL",
"CSEdomain",
"CombineOp"
] | [
"combine_compimm_eq_0_sound",
"combine_compimm_eq_1_sound",
"combine_compimm_ne_0_sound",
"combine_compimm_ne_1_sound",
"combine_cond",
"eval_condition",
"get",
"map"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_cond'_sound:
forall cond args res res',
combine_cond' cond args = Some res' ->
eval_condition cond (map valu args) m = Some res ->
res = res'. | Proof.
intros. unfold combine_cond' in *.
destruct cond; inv H; destruct args; inv H2; destruct args; inv H1; destruct args; inv H2.
apply (combine_comparison_cmp_sound valu c v v0 res res'); auto.
apply (combine_comparison_cmpu_sound valu m c v v0 res res'); auto.
apply (combine_comparison_cmpl_sound valu c... | Theorem | combine_cond'_sound | aarch64 | aarch64/CombineOpproof.v | [
"Coq",
"FunInd",
"Coqlib",
"AST",
"Integers",
"Values",
"Memory",
"Op",
"Registers",
"RTL",
"CSEdomain",
"CombineOp"
] | [
"combine_comparison_cmp_sound",
"combine_comparison_cmpl_sound",
"combine_comparison_cmplu_sound",
"combine_comparison_cmpu_sound",
"combine_cond'",
"eval_condition",
"inv",
"map",
"res"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_addr_sound:
forall addr args addr' args',
combine_addr get addr args = Some(addr', args') ->
eval_addressing ge sp addr' (map valu args') = eval_addressing ge sp addr (map valu args). | Proof.
intros. functional inversion H; subst.
- (* indexed - addimml *)
UseGetSound. simpl. rewrite <- H0. rewrite Val.addl_assoc. auto.
Qed. | Theorem | combine_addr_sound | aarch64 | aarch64/CombineOpproof.v | [
"Coq",
"FunInd",
"Coqlib",
"AST",
"Integers",
"Values",
"Memory",
"Op",
"Registers",
"RTL",
"CSEdomain",
"CombineOp"
] | [
"UseGetSound",
"addl_assoc",
"combine_addr",
"eval_addressing",
"ge",
"get",
"map"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
combine_op_sound:
forall op args op' args' r,
combine_op get op args = Some(op', args') ->
eval_operation ge sp op (map valu args) m = Some r ->
exists r', eval_operation ge sp op' (map valu args') m = Some r' /\ Val.lessdef r r'. | Proof.
intros. functional inversion H; subst.
(* addimm - addimm *)
- UseGetSound. exists r; split; auto.
rewrite <- H0. simpl. rewrite <- H1. rewrite Val.add_assoc. auto.
(* andimm - andimm *)
- UseGetSound; simpl.
generalize (Int.eq_spec p m0); rewrite H8; intros. exists r; split; auto.
rewrite ... | Theorem | combine_op_sound | aarch64 | aarch64/CombineOpproof.v | [
"Coq",
"FunInd",
"Coqlib",
"AST",
"Integers",
"Values",
"Memory",
"Op",
"Registers",
"RTL",
"CSEdomain",
"CombineOp"
] | [
"UseGetSound",
"Vfalse",
"Vtrue",
"add_assoc",
"addl_assoc",
"and_assoc",
"andl_assoc",
"combine_cond'_sound",
"combine_cond_sound",
"combine_op",
"decEq",
"eq_spec",
"eval_condition",
"eval_operation",
"fold",
"ge",
"get",
"inv",
"lessdef",
"map",
"or_assoc",
"orl_assoc",
... | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
GENV: genv_match bc ge. | Hypothesis | GENV | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"ge",
"genv_match"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | ||
STACK: bc sp = BCstack. | Hypothesis | STACK | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | ||
MATCH: ematch bc e ae. | Hypothesis | MATCH | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"ematch"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | ||
match_G:
forall r id ofs,
AE.get r ae = Ptr(Gl id ofs) -> Val.lessdef e#r (Genv.symbol_address ge id ofs). | Proof.
intros. apply vmatch_ptr_gl with bc; auto. rewrite <- H. apply MATCH.
Qed. | Lemma | match_G | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"Genv",
"MATCH",
"ge",
"get",
"lessdef",
"symbol_address",
"vmatch_ptr_gl"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
match_S:
forall r ofs,
AE.get r ae = Ptr(Stk ofs) -> Val.lessdef e#r (Vptr sp ofs). | Proof.
intros. apply vmatch_ptr_stk with bc; auto. rewrite <- H. apply MATCH.
Qed. | Lemma | match_S | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"MATCH",
"get",
"lessdef",
"vmatch_ptr_stk"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
InvApproxRegs | :=
match goal with
| [ H: _ :: _ = _ :: _ |- _ ] =>
injection H; clear H; intros; InvApproxRegs
| [ H: ?v = AE.get ?r ae |- _ ] =>
generalize (MATCH r); rewrite <- H; clear H; intro; InvApproxRegs
| _ => idtac
end. | Ltac | InvApproxRegs | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"MATCH",
"get"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
SimplVM | :=
match goal with
| [ H: vmatch _ ?v (I ?n) |- _ ] =>
let E := fresh in
assert (E: v = Vint n) by (inversion H; auto);
rewrite E in *; clear H; SimplVM
| [ H: vmatch _ ?v (L ?n) |- _ ] =>
let E := fresh in
assert (E: v = Vlong n) by (inversion H; auto);
rewrite E in *; clear H... | Ltac | SimplVM | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"Genv",
"ge",
"lessdef",
"symbol_address",
"vmatch",
"vmatch_ptr_gl",
"vmatch_ptr_stk"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
const_for_result_correct:
forall a op v,
const_for_result a = Some op ->
vmatch bc v a ->
exists v', eval_operation ge (Vptr sp Ptrofs.zero) op nil m = Some v' /\ Val.lessdef v v'. | Proof.
unfold const_for_result; intros; destruct a; inv H; SimplVM.
- (* integer *)
exists (Vint n); auto.
- (* integer or undef *)
exists (Vint n); split; auto. inv H0; auto.
- (* long *)
exists (Vlong n); auto.
- (* float *)
destruct (Compopts.generate_float_constants tt); inv H2. exists (Vfloat f); auto.
-... | Lemma | const_for_result_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"Genv",
"SimplVM",
"add_zero_l",
"eval_operation",
"ge",
"generate_float_constants",
"inv",
"lessdef",
"symbol_address",
"vmatch",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
eval_static_shift_correct: forall s v a,
eval_shift s (Vint v) a = Vint (eval_static_shift s v a). | Proof.
intros; destruct s; simpl; rewrite ? a32_range; auto.
Qed. | Lemma | eval_static_shift_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eval_shift",
"eval_static_shift"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
eval_static_shiftl_correct: forall s v a,
eval_shiftl s (Vlong v) a = Vlong (eval_static_shiftl s v a). | Proof.
intros; destruct s; simpl; rewrite ? a64_range; auto.
Qed. | Lemma | eval_static_shiftl_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eval_shiftl",
"eval_static_shiftl"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
eval_static_extend_correct: forall x v a,
eval_extend x (Vint v) a = Vlong (eval_static_extend x v a). | Proof.
unfold eval_extend, eval_static_extend; intros; destruct x; simpl; rewrite ? a64_range; auto.
Qed. | Lemma | eval_static_extend_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eval_extend",
"eval_static_extend"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
cond_strength_reduction_correct:
forall cond args vl,
vl = map (fun r => AE.get r ae) args ->
let (cond', args') := cond_strength_reduction cond args vl in
eval_condition cond' e##args' m = eval_condition cond e##args m. | Proof.
intros until vl. unfold cond_strength_reduction.
case (cond_strength_reduction_match cond args vl); simpl; intros; InvApproxRegs; SimplVM.
- apply Val.swap_cmp_bool.
- auto.
- apply Val.swap_cmpu_bool.
- auto.
- rewrite eval_static_shift_correct; auto.
- rewrite eval_static_shift_correct; auto.
- apply Val.s... | Lemma | cond_strength_reduction_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"InvApproxRegs",
"SimplVM",
"cmp_swap",
"eq_dec",
"eval_condition",
"eval_static_shift_correct",
"eval_static_shiftl_correct",
"get",
"map",
"swap_cmp_bool",
"swap_cmpl_bool",
"swap_cmplu_bool",
"swap_cmpu_bool",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_cmp_base_correct:
forall c args vl,
vl = map (fun r => AE.get r ae) args ->
let (op', args') := make_cmp_base c args vl in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op' e##args' m = Some v
/\ Val.lessdef (Val.of_optbool (eval_condition c e##args m)) v. | Proof.
intros. unfold make_cmp_base.
generalize (cond_strength_reduction_correct c args vl H).
destruct (cond_strength_reduction c args vl) as [c' args']. intros EQ.
econstructor; split. simpl; eauto. rewrite EQ. auto.
Qed. | Lemma | make_cmp_base_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"cond_strength_reduction_correct",
"eval_condition",
"eval_operation",
"ge",
"get",
"lessdef",
"map",
"of_optbool",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_cmp_correct:
forall c args vl,
vl = map (fun r => AE.get r ae) args ->
let (op', args') := make_cmp c args vl in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op' e##args' m = Some v
/\ Val.lessdef (Val.of_optbool (eval_condition c e##args m)) v. | Proof.
intros c args vl.
assert (Y: forall r, vincl (AE.get r ae) (Uns Ptop 1) = true ->
e#r = Vundef \/ e#r = Vint Int.zero \/ e#r = Vint Int.one).
{ intros. apply vmatch_Uns_1 with bc Ptop. eapply vmatch_ge. eapply vincl_ge; eauto. apply MATCH. }
unfold make_cmp. case (make_cmp_match c args vl); ... | Lemma | make_cmp_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"E0",
"InvBooleans",
"MATCH",
"Ptop",
"eq_dec",
"eval_condition",
"eval_operation",
"exploit",
"ge",
"get",
"inv",
"lessdef",
"make_cmp",
"make_cmp_base_correct",
"map",
"of_optbool",
"one",
"vincl",
"vincl_ge",
"vmatch_Uns_1",
"vmatch_ge",
"xor",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_select_correct:
forall c ty r1 r2 args vl,
vl = map (fun r => AE.get r ae) args ->
let (op', args') := make_select c ty r1 r2 args vl in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op' e##args' m = Some v
/\ Val.lessdef (Val.select (eval_condition c e##args m) e#r1 e#r2 ty) v. | Proof.
unfold make_select; intros.
destruct (resolve_branch (eval_static_condition c vl)) as [b|] eqn:RB.
- exists (if b then e#r1 else e#r2); split.
+ simpl. destruct b; auto.
+ destruct (eval_condition c e##args m) as [b'|] eqn:EC; simpl; auto.
assert (b = b').
{ eapply resolve_branch_sound; eauto.
rewri... | Lemma | make_select_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"MATCH",
"aregs_sound",
"cond_strength_reduction_correct",
"eval_condition",
"eval_operation",
"eval_static_condition",
"eval_static_condition_sound",
"ge",
"get",
"lessdef",
"lessdef_normalize",
"map",
"resolve_branch",
"resolve_branch_sound",
"select",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_addimm_correct:
forall n r,
let (op, args) := make_addimm n r in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.add e#r (Vint n)) v. | Proof.
intros. unfold make_addimm.
predSpec Int.eq Int.eq_spec n Int.zero; intros.
subst. exists (e#r); split; auto.
destruct (e#r); simpl; rewrite ?Int.add_zero; auto.
exists (Val.add e#r (Vint n)); split; auto.
Qed. | Lemma | make_addimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"add",
"add_zero",
"eq",
"eq_spec",
"eval_operation",
"ge",
"lessdef",
"predSpec",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_shlimm_correct:
forall n r1 r2,
e#r2 = Vint n ->
let (op, args) := make_shlimm n r1 r2 in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.shl e#r1 (Vint n)) v. | Proof.
Local Opaque mk_amount32.
intros; unfold make_shlimm.
predSpec Int.eq Int.eq_spec n Int.zero; intros. subst.
exists (e#r1); split; auto. destruct (e#r1); simpl; auto. rewrite Int.shl_zero. auto.
destruct (Int.ltu n Int.iwordsize) eqn:L.
econstructor; split. simpl. eauto. rewrite mk_amount32_eq; auto.
... | Lemma | make_shlimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq",
"eq_spec",
"eval_operation",
"ge",
"iwordsize",
"lessdef",
"ltu",
"mk_amount32",
"mk_amount32_eq",
"predSpec",
"shl",
"shl_zero",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_shrimm_correct:
forall n r1 r2,
e#r2 = Vint n ->
let (op, args) := make_shrimm n r1 r2 in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.shr e#r1 (Vint n)) v. | Proof.
intros; unfold make_shrimm.
predSpec Int.eq Int.eq_spec n Int.zero; intros. subst.
exists (e#r1); split; auto. destruct (e#r1); simpl; auto. rewrite Int.shr_zero. auto.
destruct (Int.ltu n Int.iwordsize) eqn:L.
econstructor; split. simpl. eauto. rewrite mk_amount32_eq; auto.
econstructor; split. simp... | Lemma | make_shrimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq",
"eq_spec",
"eval_operation",
"ge",
"iwordsize",
"lessdef",
"ltu",
"mk_amount32_eq",
"predSpec",
"shr",
"shr_zero",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_shruimm_correct:
forall n r1 r2,
e#r2 = Vint n ->
let (op, args) := make_shruimm n r1 r2 in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.shru e#r1 (Vint n)) v. | Proof.
intros; unfold make_shruimm.
predSpec Int.eq Int.eq_spec n Int.zero; intros. subst.
exists (e#r1); split; auto. destruct (e#r1); simpl; auto. rewrite Int.shru_zero. auto.
destruct (Int.ltu n Int.iwordsize) eqn:L.
econstructor; split. simpl. eauto. rewrite mk_amount32_eq; auto.
econstructor; split. si... | Lemma | make_shruimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq",
"eq_spec",
"eval_operation",
"ge",
"iwordsize",
"lessdef",
"ltu",
"mk_amount32_eq",
"predSpec",
"shru",
"shru_zero",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_mulimm_correct:
forall n r1 r2,
e#r2 = Vint n ->
let (op, args) := make_mulimm n r1 r2 in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.mul e#r1 (Vint n)) v. | Proof.
intros; unfold make_mulimm.
predSpec Int.eq Int.eq_spec n Int.zero; intros. subst.
exists (Vint Int.zero); split; auto. destruct (e#r1); simpl; auto. rewrite Int.mul_zero; auto.
predSpec Int.eq Int.eq_spec n Int.one; intros. subst.
exists (e#r1); split; auto. destruct (e#r1); simpl; auto. rewrite Int.m... | Lemma | make_mulimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq",
"eq_spec",
"eval_operation",
"ge",
"is_power2",
"is_power2_range",
"lessdef",
"mk_amount32_eq",
"mul",
"mul_one",
"mul_pow2",
"mul_zero",
"one",
"predSpec",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_divimm_correct:
forall n r1 r2 v,
Val.divs e#r1 e#r2 = Some v ->
e#r2 = Vint n ->
let (op, args) := make_divimm n r1 r2 in
exists w, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some w /\ Val.lessdef v w. | Proof.
intros; unfold make_divimm.
predSpec Int.eq Int.eq_spec n Int.one; intros. subst. rewrite H0 in H.
destruct (e#r1) eqn:?;
try (rewrite Val.divs_one in H; exists (Vint i); split; simpl; try rewrite Heqv0; auto);
inv H; auto.
destruct (Int.is_power2 n) eqn:?.
destruct (Int.ltu i (Int.repr 31)) eq... | Lemma | make_divimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"divs",
"divs_one",
"divs_pow2",
"eq",
"eq_spec",
"eval_operation",
"ge",
"inv",
"is_power2",
"lessdef",
"ltu",
"one",
"predSpec",
"repr",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_divuimm_correct:
forall n r1 r2 v,
Val.divu e#r1 e#r2 = Some v ->
e#r2 = Vint n ->
let (op, args) := make_divuimm n r1 r2 in
exists w, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some w /\ Val.lessdef v w. | Proof.
intros; unfold make_divuimm.
predSpec Int.eq Int.eq_spec n Int.one; intros. subst. rewrite H0 in H.
destruct (e#r1) eqn:?;
try (rewrite Val.divu_one in H; exists (Vint i); split; simpl; try rewrite Heqv0; auto);
inv H; auto.
destruct (Int.is_power2 n) eqn:?.
econstructor; split. simpl; eauto.
... | Lemma | make_divuimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"divu",
"divu_one",
"divu_pow2",
"eq",
"eq_spec",
"eval_operation",
"ge",
"inv",
"is_power2",
"is_power2_range",
"lessdef",
"mk_amount32_eq",
"one",
"predSpec",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_andimm_correct:
forall n r x,
vmatch bc e#r x ->
let (op, args) := make_andimm n r x in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.and e#r (Vint n)) v. | Proof.
intros; unfold make_andimm.
predSpec Int.eq Int.eq_spec n Int.zero; intros.
subst n. exists (Vint Int.zero); split; auto. destruct (e#r); simpl; auto. rewrite Int.and_zero; auto.
predSpec Int.eq Int.eq_spec n Int.mone; intros.
subst n. exists (e#r); split; auto. destruct (e#r); simpl; auto. rewrite Int... | Lemma | make_andimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"and",
"and_mone",
"and_zero",
"bit_solve",
"bits_not",
"bits_zero",
"bits_zero_ext",
"eq",
"eq_spec",
"eval_operation",
"ge",
"inv",
"lessdef",
"mone",
"not",
"predSpec",
"testbit",
"vmatch",
"zero",
"zero_ext",
"zlt",
"zlt_true"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_orimm_correct:
forall n r,
let (op, args) := make_orimm n r in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.or e#r (Vint n)) v. | Proof.
intros; unfold make_orimm.
predSpec Int.eq Int.eq_spec n Int.zero; intros.
subst n. exists (e#r); split; auto. destruct (e#r); simpl; auto. rewrite Int.or_zero; auto.
predSpec Int.eq Int.eq_spec n Int.mone; intros.
subst n. exists (Vint Int.mone); split; auto. destruct (e#r); simpl; auto. rewrite Int.o... | Lemma | make_orimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq",
"eq_spec",
"eval_operation",
"ge",
"lessdef",
"mone",
"or",
"or_mone",
"or_zero",
"predSpec",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_xorimm_correct:
forall n r,
let (op, args) := make_xorimm n r in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.xor e#r (Vint n)) v. | Proof.
intros; unfold make_xorimm.
predSpec Int.eq Int.eq_spec n Int.zero; intros.
subst n. exists (e#r); split; auto. destruct (e#r); simpl; auto. rewrite Int.xor_zero; auto.
predSpec Int.eq Int.eq_spec n Int.mone; intros.
subst n. exists (Val.notint e#r); split; auto.
econstructor; split; eauto. auto.
Qed... | Lemma | make_xorimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq",
"eq_spec",
"eval_operation",
"ge",
"lessdef",
"mone",
"notint",
"predSpec",
"xor",
"xor_zero",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_addlimm_correct:
forall n r,
let (op, args) := make_addlimm n r in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.addl e#r (Vlong n)) v. | Proof.
intros. unfold make_addlimm.
predSpec Int64.eq Int64.eq_spec n Int64.zero; intros.
subst. exists (e#r); split; auto.
destruct (e#r); simpl; auto; rewrite ? Int64.add_zero, ? Ptrofs.add_zero; auto.
exists (Val.addl e#r (Vlong n)); split; auto.
Qed. | Lemma | make_addlimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"add_zero",
"addl",
"eq",
"eq_spec",
"eval_operation",
"ge",
"lessdef",
"predSpec",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_shllimm_correct:
forall n r1 r2,
e#r2 = Vint n ->
let (op, args) := make_shllimm n r1 r2 in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.shll e#r1 (Vint n)) v. | Proof.
Local Opaque mk_amount64.
intros; unfold make_shllimm.
predSpec Int.eq Int.eq_spec n Int.zero; intros. subst.
exists (e#r1); split; auto. destruct (e#r1); simpl; auto.
unfold Int64.shl'. rewrite Z.shiftl_0_r, Int64.repr_unsigned. auto.
destruct (Int.ltu n Int64.iwordsize') eqn:L.
econstructor; split.... | Lemma | make_shllimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq",
"eq_spec",
"eval_operation",
"ge",
"iwordsize'",
"lessdef",
"ltu",
"mk_amount64",
"mk_amount64_eq",
"predSpec",
"repr_unsigned",
"shl'",
"shll",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_shrlimm_correct:
forall n r1 r2,
e#r2 = Vint n ->
let (op, args) := make_shrlimm n r1 r2 in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.shrl e#r1 (Vint n)) v. | Proof.
intros; unfold make_shrlimm.
predSpec Int.eq Int.eq_spec n Int.zero; intros. subst.
exists (e#r1); split; auto. destruct (e#r1); simpl; auto.
unfold Int64.shr'. rewrite Z.shiftr_0_r, Int64.repr_signed. auto.
destruct (Int.ltu n Int64.iwordsize') eqn:L.
econstructor; split. simpl. eauto. rewrite mk_am... | Lemma | make_shrlimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq",
"eq_spec",
"eval_operation",
"ge",
"iwordsize'",
"lessdef",
"ltu",
"mk_amount64_eq",
"predSpec",
"repr_signed",
"shr'",
"shrl",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_shrluimm_correct:
forall n r1 r2,
e#r2 = Vint n ->
let (op, args) := make_shrluimm n r1 r2 in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.shrlu e#r1 (Vint n)) v. | Proof.
intros; unfold make_shrluimm.
predSpec Int.eq Int.eq_spec n Int.zero; intros. subst.
exists (e#r1); split; auto. destruct (e#r1); simpl; auto.
unfold Int64.shru'. rewrite Z.shiftr_0_r, Int64.repr_unsigned. auto.
destruct (Int.ltu n Int64.iwordsize') eqn:L.
econstructor; split. simpl. eauto. rewrite m... | Lemma | make_shrluimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq",
"eq_spec",
"eval_operation",
"ge",
"iwordsize'",
"lessdef",
"ltu",
"mk_amount64_eq",
"predSpec",
"repr_unsigned",
"shrlu",
"shru'",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_mullimm_correct:
forall n r1 r2,
e#r2 = Vlong n ->
let (op, args) := make_mullimm n r1 r2 in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.mull e#r1 (Vlong n)) v. | Proof.
intros; unfold make_mullimm.
predSpec Int64.eq Int64.eq_spec n Int64.zero; intros. subst.
exists (Vlong Int64.zero); split; auto. destruct (e#r1); simpl; auto. rewrite Int64.mul_zero; auto.
predSpec Int64.eq Int64.eq_spec n Int64.one; intros. subst.
exists (e#r1); split; auto. destruct (e#r1); simpl; a... | Lemma | make_mullimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq",
"eq_spec",
"eval_operation",
"ge",
"is_power2'",
"is_power2'_range",
"lessdef",
"mk_amount64_eq",
"mul_one",
"mul_pow2'",
"mul_zero",
"mull",
"one",
"predSpec",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_divlimm_correct:
forall n r1 r2 v,
Val.divls e#r1 e#r2 = Some v ->
e#r2 = Vlong n ->
let (op, args) := make_divlimm n r1 r2 in
exists w, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some w /\ Val.lessdef v w. | Proof.
intros; unfold make_divlimm.
destruct (Int64.is_power2' n) eqn:?. destruct (Int.ltu i (Int.repr 63)) eqn:?.
rewrite H0 in H. econstructor; split. simpl; eauto. eapply Val.divls_pow2; eauto. auto.
exists v; auto.
exists v; auto.
Qed. | Lemma | make_divlimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"divls",
"divls_pow2",
"eval_operation",
"ge",
"is_power2'",
"lessdef",
"ltu",
"repr",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_divluimm_correct:
forall n r1 r2 v,
Val.divlu e#r1 e#r2 = Some v ->
e#r2 = Vlong n ->
let (op, args) := make_divluimm n r1 r2 in
exists w, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some w /\ Val.lessdef v w. | Proof.
intros; unfold make_divluimm.
destruct (Int64.is_power2' n) eqn:?.
econstructor; split. simpl; eauto.
rewrite mk_amount64_eq by (eapply Int64.is_power2'_range; eauto).
rewrite H0 in H. destruct (e#r1); inv H. destruct (Int64.eq n Int64.zero); inv H2.
simpl.
erewrite Int64.is_power2'_range by eauto.... | Lemma | make_divluimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"divlu",
"divu_pow2'",
"eq",
"eval_operation",
"ge",
"inv",
"is_power2'",
"is_power2'_range",
"lessdef",
"mk_amount64_eq",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_andlimm_correct:
forall n r x,
let (op, args) := make_andlimm n r x in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.andl e#r (Vlong n)) v. | Proof.
intros; unfold make_andlimm.
predSpec Int64.eq Int64.eq_spec n Int64.zero; intros.
subst n. exists (Vlong Int64.zero); split; auto. destruct (e#r); simpl; auto. rewrite Int64.and_zero; auto.
predSpec Int64.eq Int64.eq_spec n Int64.mone; intros.
subst n. exists (e#r); split; auto. destruct (e#r); simpl;... | Lemma | make_andlimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"and_mone",
"and_zero",
"andl",
"eq",
"eq_spec",
"eval_operation",
"ge",
"lessdef",
"mone",
"predSpec",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_orlimm_correct:
forall n r,
let (op, args) := make_orlimm n r in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.orl e#r (Vlong n)) v. | Proof.
intros; unfold make_orlimm.
predSpec Int64.eq Int64.eq_spec n Int64.zero; intros.
subst n. exists (e#r); split; auto. destruct (e#r); simpl; auto. rewrite Int64.or_zero; auto.
predSpec Int64.eq Int64.eq_spec n Int64.mone; intros.
subst n. exists (Vlong Int64.mone); split; auto. destruct (e#r); simpl; a... | Lemma | make_orlimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq",
"eq_spec",
"eval_operation",
"ge",
"lessdef",
"mone",
"or_mone",
"or_zero",
"orl",
"predSpec",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_xorlimm_correct:
forall n r,
let (op, args) := make_xorlimm n r in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.xorl e#r (Vlong n)) v. | Proof.
intros; unfold make_xorlimm.
predSpec Int64.eq Int64.eq_spec n Int64.zero; intros.
subst n. exists (e#r); split; auto. destruct (e#r); simpl; auto. rewrite Int64.xor_zero; auto.
predSpec Int64.eq Int64.eq_spec n Int64.mone; intros.
subst n. exists (Val.notl e#r); split; auto.
econstructor; split; eau... | Lemma | make_xorlimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq",
"eq_spec",
"eval_operation",
"ge",
"lessdef",
"mone",
"notl",
"predSpec",
"xor_zero",
"xorl",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_mulfimm_correct:
forall n r1 r2,
e#r2 = Vfloat n ->
let (op, args) := make_mulfimm n r1 r1 r2 in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.mulf e#r1 e#r2) v. | Proof.
intros; unfold make_mulfimm.
destruct (Float.eq_dec n (Float.of_int (Int.repr 2))); intros.
simpl. econstructor; split. eauto. rewrite H; subst n.
destruct (e#r1); simpl; auto. rewrite Float.mul2_add; auto.
simpl. econstructor; split; eauto.
Qed. | Lemma | make_mulfimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq_dec",
"eval_operation",
"ge",
"lessdef",
"mul2_add",
"mulf",
"of_int",
"repr",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_mulfimm_correct_2:
forall n r1 r2,
e#r1 = Vfloat n ->
let (op, args) := make_mulfimm n r2 r1 r2 in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.mulf e#r1 e#r2) v. | Proof.
intros; unfold make_mulfimm.
destruct (Float.eq_dec n (Float.of_int (Int.repr 2))); intros.
simpl. econstructor; split. eauto. rewrite H; subst n.
destruct (e#r2); simpl; auto. rewrite Float.mul2_add; auto.
rewrite Float.mul_commut; auto.
simpl. econstructor; split; eauto.
Qed. | Lemma | make_mulfimm_correct_2 | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq_dec",
"eval_operation",
"ge",
"lessdef",
"mul2_add",
"mul_commut",
"mulf",
"of_int",
"repr",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_mulfsimm_correct:
forall n r1 r2,
e#r2 = Vsingle n ->
let (op, args) := make_mulfsimm n r1 r1 r2 in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.mulfs e#r1 e#r2) v. | Proof.
intros; unfold make_mulfsimm.
destruct (Float32.eq_dec n (Float32.of_int (Int.repr 2))); intros.
simpl. econstructor; split. eauto. rewrite H; subst n.
destruct (e#r1); simpl; auto. rewrite Float32.mul2_add; auto.
simpl. econstructor; split; eauto.
Qed. | Lemma | make_mulfsimm_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq_dec",
"eval_operation",
"ge",
"lessdef",
"mul2_add",
"mulfs",
"of_int",
"repr",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_mulfsimm_correct_2:
forall n r1 r2,
e#r1 = Vsingle n ->
let (op, args) := make_mulfsimm n r2 r1 r2 in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.mulfs e#r1 e#r2) v. | Proof.
intros; unfold make_mulfsimm.
destruct (Float32.eq_dec n (Float32.of_int (Int.repr 2))); intros.
simpl. econstructor; split. eauto. rewrite H; subst n.
destruct (e#r2); simpl; auto. rewrite Float32.mul2_add; auto.
rewrite Float32.mul_commut; auto.
simpl. econstructor; split; eauto.
Qed. | Lemma | make_mulfsimm_correct_2 | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"eq_dec",
"eval_operation",
"ge",
"lessdef",
"mul2_add",
"mul_commut",
"mulfs",
"of_int",
"repr",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_zext_correct:
forall s r x,
vmatch bc e#r x ->
let (op, args) := make_zext s r x in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.zero_ext s e#r) v. | Proof.
intros; unfold make_zext. destruct (vincl x (Uns Ptop s)) eqn:INCL.
- exists e#r; split; auto.
assert (V: vmatch bc e#r (Uns Ptop s)).
{ eapply vmatch_ge; eauto. apply vincl_ge; auto. }
inv V; simpl; auto. rewrite is_uns_zero_ext in H4 by auto. rewrite H4; auto.
- econstructor; split; simpl; eauto.
Qed. | Lemma | make_zext_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"Ptop",
"eval_operation",
"ge",
"inv",
"is_uns_zero_ext",
"lessdef",
"vincl",
"vincl_ge",
"vmatch",
"vmatch_ge",
"zero",
"zero_ext"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
make_sext_correct:
forall s r x,
vmatch bc e#r x ->
let (op, args) := make_sext s r x in
exists v, eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v /\ Val.lessdef (Val.sign_ext s e#r) v. | Proof.
intros; unfold make_sext. destruct (vincl x (Sgn Ptop s)) eqn:INCL.
- exists e#r; split; auto.
assert (V: vmatch bc e#r (Sgn Ptop s)).
{ eapply vmatch_ge; eauto. apply vincl_ge; auto. }
inv V; simpl; auto. rewrite is_sgn_sign_ext in H4 by auto. rewrite H4; auto.
- econstructor; split; simpl; eauto.
Qed. | Lemma | make_sext_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"Ptop",
"eval_operation",
"ge",
"inv",
"is_sgn_sign_ext",
"lessdef",
"sign_ext",
"vincl",
"vincl_ge",
"vmatch",
"vmatch_ge",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
op_strength_reduction_correct:
forall op args vl v,
vl = map (fun r => AE.get r ae) args ->
eval_operation ge (Vptr sp Ptrofs.zero) op e##args m = Some v ->
let (op', args') := op_strength_reduction op args vl in
exists w, eval_operation ge (Vptr sp Ptrofs.zero) op' e##args' m = Some w /\ Val.lessdef v w. | Proof.
intros until v; unfold op_strength_reduction;
case (op_strength_reduction_match op args vl); simpl; intros.
- (* add 1 *)
rewrite Val.add_commut in H0. InvApproxRegs; SimplVM; inv H0. apply make_addimm_correct; auto.
- (* add 2 *)
InvApproxRegs; SimplVM; inv H0. apply make_addimm_correct; auto.
- (* adds... | Lemma | op_strength_reduction_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"InvApproxRegs",
"SimplVM",
"add_commut",
"addl_commut",
"and_commut",
"andl_commut",
"eval_operation",
"eval_static_extend_correct",
"eval_static_shift_correct",
"eval_static_shiftl_correct",
"fold",
"ge",
"get",
"inv",
"lessdef",
"make_addimm_correct",
"make_addlimm_correct",
"ma... | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
addr_strength_reduction_correct:
forall addr args vl res,
vl = map (fun r => AE.get r ae) args ->
eval_addressing ge (Vptr sp Ptrofs.zero) addr e##args = Some res ->
let (addr', args') := addr_strength_reduction addr args vl in
exists res', eval_addressing ge (Vptr sp Ptrofs.zero) addr' e##args' = Some res' /... | Proof.
intros until res. unfold addr_strength_reduction.
destruct (addr_strength_reduction_match addr args vl); simpl;
intros VL EA; InvApproxRegs; SimplVM; try (inv EA).
- econstructor; split; eauto. inv H0; simpl; auto. rewrite H2.
unfold Genv.symbol_address. destruct (Genv.find_symbol ge symb); auto.
- rewri... | Lemma | addr_strength_reduction_correct | aarch64 | aarch64/ConstpropOpproof.v | [
"Coqlib",
"Compopts",
"Integers",
"Floats",
"Values",
"Memory",
"Globalenvs",
"Events",
"Op",
"Registers",
"RTL",
"ValueDomain",
"ValueAOp",
"ValueAnalysis",
"ConstpropOp"
] | [
"Genv",
"InvApproxRegs",
"SimplVM",
"add_commut",
"add_zero_l",
"addl_commut",
"eval_addressing",
"eval_static_extend_correct",
"find_symbol",
"ge",
"get",
"inv",
"lessdef",
"map",
"res",
"symbol_address",
"zero"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
is_callee_save (r: mreg): bool | :=
match r with
| R0 | R1 | R2 | R3 | R4 | R5 | R6 | R7 => false
| R8 | R9 | R10 | R11 | R12 | R13 | R14 | R15 => false
| R17 => false
| R19 | R20 | R21 | R22 | R23 => true
| R24 | R25 | R26 | R27 | R28 => true
| R29 => true
| F0 | F1 | F2 | F3 | F4 | F5 | F6 | F7 => false
| F8 | F9 ... | Definition | is_callee_save | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"mreg"
] | Machine registers (type [mreg] in module [Locations]) are divided in:
- Callee-save registers, whose value is preserved across a function call.
- Caller-save registers that can be modified during a function call.
We follow the Procedure Call Standard for the ARM 64-bit Architecture
(AArch64) document: R19-R28 and ... | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
int_caller_save_regs | :=
R0 :: R1 :: R2 :: R3 :: R4 :: R5 :: R6 :: R7
:: R8 :: R9 :: R10 :: R11 :: R12 :: R13 :: R14 :: R15
:: R17 :: nil. | Definition | int_caller_save_regs | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
float_caller_save_regs | :=
F0 :: F1 :: F2 :: F3 :: F4 :: F5 :: F6 :: F7
:: F16 :: F17 :: F18 :: F19 :: F20 :: F21 :: F22 :: F23
:: F24 :: F25 :: F26 :: F27 :: F28 :: F29 :: F30 :: F31 :: nil. | Definition | float_caller_save_regs | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
int_callee_save_regs | :=
R19 :: R20 :: R21 :: R22 :: R23
:: R24 :: R25 :: R26 :: R27 :: R28 :: R29 :: nil. | Definition | int_callee_save_regs | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
float_callee_save_regs | :=
F8 :: F9 :: F10 :: F11 :: F12 :: F13 :: F14 :: F15 :: nil. | Definition | float_callee_save_regs | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
destroyed_at_call | :=
List.filter (fun r => negb (is_callee_save r)) all_mregs. | Definition | destroyed_at_call | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"all_mregs",
"is_callee_save"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
dummy_int_reg | := R0. | Definition | dummy_int_reg | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
dummy_float_reg | := F0. | Definition | dummy_float_reg | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [] | r Used in [Coloring]. | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
callee_save_type | := mreg_type. | Definition | callee_save_type | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"mreg_type"
] | r Used in [Coloring]. | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
is_float_reg (r: mreg): bool | :=
match r with
| R0 | R1 | R2 | R3 | R4 | R5 | R6 | R7
| R8 | R9 | R10 | R11 | R12 | R13 | R14 | R15
| R17 | R19 | R20 | R21 | R22 | R23
| R24 | R25 | R26 | R27 | R28
| R29 => false
| F0 | F1 | F2 | F3 | F4 | F5 | F6 | F7
| F8 | F9 | F10 | F11 | F12 | F13 | F14 | F15
| F16 | F17 | ... | Definition | is_float_reg | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"mreg"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
alloc_regs | := mk_alloc_regs {
preferred_int_regs: list mreg;
remaining_int_regs: list mreg;
preferred_float_regs: list mreg;
remaining_float_regs: list mreg
}. | Record | alloc_regs | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"mreg"
] | How to use registers for register allocation.
We favor the use of caller-save registers, using callee-save registers
only when no caller-save is available. | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
allocatable_registers (_: unit) | :=
{| preferred_int_regs := int_caller_save_regs;
remaining_int_regs := int_callee_save_regs;
preferred_float_regs := float_caller_save_regs;
remaining_float_regs := float_callee_save_regs |}. | Definition | allocatable_registers | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"float_callee_save_regs",
"float_caller_save_regs",
"int_callee_save_regs",
"int_caller_save_regs"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
loc_result (s: signature) : rpair mreg | :=
match proj_sig_res s with
| Tint | Tlong | Tany32 | Tany64 => One R0
| Tfloat | Tsingle => One F0
end. | Definition | loc_result | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"mreg",
"proj_sig_res",
"rpair",
"signature"
] | The result value of a function is passed back to the caller in
registers [R0] or [F0], depending on the type of the
returned value. We treat a function without result as a function
with one integer result. | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
loc_result_type:
forall sig,
subtype (proj_sig_res sig) (typ_rpair mreg_type (loc_result sig)) = true. | Proof.
intros. unfold loc_result. destruct (proj_sig_res sig); auto.
Qed. | Lemma | loc_result_type | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"loc_result",
"mreg_type",
"proj_sig_res",
"subtype",
"typ_rpair"
] | The result registers have types compatible with that given in the signature. | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
loc_result_caller_save:
forall (s: signature),
forall_rpair (fun r => is_callee_save r = false) (loc_result s). | Proof.
intros.
unfold loc_result. destruct (proj_sig_res s); simpl; auto.
Qed. | Lemma | loc_result_caller_save | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"forall_rpair",
"is_callee_save",
"loc_result",
"proj_sig_res",
"signature"
] | The result locations are caller-save registers | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
loc_result_pair:
forall sg,
match loc_result sg with
| One _ => True
| Twolong r1 r2 =>
r1 <> r2 /\ proj_sig_res sg = Tlong
/\ subtype Tint (mreg_type r1) = true /\ subtype Tint (mreg_type r2) = true
/\ Archi.ptr64 = false
end. | Proof.
intros; unfold loc_result; destruct (proj_sig_res sg); exact I.
Qed. | Lemma | loc_result_pair | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"loc_result",
"mreg_type",
"proj_sig_res",
"ptr64",
"subtype"
] | If the result is in a pair of registers, those registers are distinct and have type [Tint] at least. | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
loc_result_exten:
forall s1 s2, s1.(sig_res) = s2.(sig_res) -> loc_result s1 = loc_result s2. | Proof.
intros. unfold loc_result, proj_sig_res. rewrite H; auto.
Qed. | Lemma | loc_result_exten | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"loc_result",
"proj_sig_res"
] | The location of the result depends only on the result part of the signature | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
int_param_regs | :=
R0 :: R1 :: R2 :: R3 :: R4 :: R5 :: R6 :: R7 :: nil. | Definition | int_param_regs | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [] | - The first 8 integer arguments are passed in registers [R0...R7].
- The first 8 FP arguments are passed in registers [F0...F7].
- Extra arguments are passed on the stack, in [Outgoing] slots,
consecutively assigned, starting at word offset 0.
In the standard AAPCS64, all stack slots are 8-byte wide (2 words).
In t... | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
float_param_regs | :=
F0 :: F1 :: F2 :: F3 :: F4 :: F5 :: F6 :: F7 :: nil. | Definition | float_param_regs | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
stack_arg (ty: typ) (ir fr ofs: Z)
(rec: Z -> Z -> Z -> list (rpair loc)) | :=
match Archi.abi with
| Archi.AAPCS64 =>
let ofs := align ofs 2 in
One (S Outgoing ofs ty) :: rec ir fr (ofs + 2)
| Archi.Apple =>
let ofs := align ofs (typesize ty) in
One (S Outgoing ofs ty) :: rec ir fr (ofs + typesize ty)
end. | Definition | stack_arg | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"abi",
"align",
"loc",
"rpair",
"typ",
"typesize"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
int_arg (ty: typ) (ir fr ofs: Z)
(rec: Z -> Z -> Z -> list (rpair loc)) | :=
match list_nth_z int_param_regs ir with
| None =>
stack_arg ty ir fr ofs rec
| Some ireg =>
One (R ireg) :: rec (ir + 1) fr ofs
end. | Definition | int_arg | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"int_param_regs",
"ireg",
"list_nth_z",
"loc",
"rpair",
"stack_arg",
"typ"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
float_arg (ty: typ) (ir fr ofs: Z)
(rec: Z -> Z -> Z -> list (rpair loc)) | :=
match list_nth_z float_param_regs fr with
| None =>
stack_arg ty ir fr ofs rec
| Some freg =>
One (R freg) :: rec ir (fr + 1) ofs
end. | Definition | float_arg | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"float_param_regs",
"freg",
"list_nth_z",
"loc",
"rpair",
"stack_arg",
"typ"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
loc_arguments_stack (tyl: list typ) (ofs: Z) {struct tyl} : list (rpair loc) | :=
match tyl with
| nil => nil
| ty :: tys => One (S Outgoing ofs Tany64) :: loc_arguments_stack tys (ofs + 2)
end. | Fixpoint | loc_arguments_stack | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"loc",
"rpair",
"typ"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
loc_arguments_rec
(tyl: list typ) (fixed ir fr ofs: Z) {struct tyl} : list (rpair loc) | :=
match tyl with
| nil => nil
| ty :: tys =>
if zle fixed 0 then loc_arguments_stack tyl (align ofs 2) else
match ty with
| Tint | Tlong | Tany32 | Tany64 =>
int_arg ty ir fr ofs (loc_arguments_rec tys (fixed - 1))
| Tfloat | Tsingle =>
float_arg ty ir fr ofs (loc_argu... | Fixpoint | loc_arguments_rec | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"align",
"float_arg",
"int_arg",
"loc",
"loc_arguments_stack",
"rpair",
"typ",
"zle"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
fixed_arguments (s: signature) : Z | :=
match Archi.abi, s.(sig_cc).(cc_vararg) with
| Archi.Apple, Some n => n
| _, _ => list_length_z s.(sig_args)
end. | Definition | fixed_arguments | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"abi",
"list_length_z",
"signature"
] | Number of fixed arguments for a function with signature [s].
For AAPCS64, all arguments are treated as fixed, even for a vararg
function. | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
loc_arguments (s: signature) : list (rpair loc) | :=
loc_arguments_rec (proj_sig_args s) (fixed_arguments s) 0 0 0. | Definition | loc_arguments | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"fixed_arguments",
"loc",
"loc_arguments_rec",
"proj_sig_args",
"rpair",
"signature"
] | [loc_arguments s] returns the list of locations where to store arguments
when calling a function with signature [s]. | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
loc_argument_acceptable (l: loc) : Prop | :=
match l with
| R r => is_callee_save r = false
| S Outgoing ofs ty => ofs >= 0 /\ (typealign ty | ofs)
| _ => False
end. | Definition | loc_argument_acceptable | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"is_callee_save",
"loc",
"typealign"
] | Argument locations are either caller-save registers or [Outgoing]
stack slots at nonnegative offsets. | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
loc_arguments_rec_charact:
forall tyl fixed ri rf ofs p,
ofs >= 0 ->
In p (loc_arguments_rec tyl fixed ri rf ofs) -> forall_rpair loc_argument_acceptable p. | Proof.
set (OK := fun (l: list (rpair loc)) =>
forall p, In p l -> forall_rpair loc_argument_acceptable p).
set (OKF := fun (f: Z -> Z -> Z -> list (rpair loc)) =>
forall ri rf ofs, ofs >= 0 -> OK (f ri rf ofs)).
assert (CSI: forall r, In r int_param_regs -> is_callee_save r = false).
... | Lemma | loc_arguments_rec_charact | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"In",
"abi",
"align",
"align_divides",
"align_le",
"decide_goal",
"float_arg",
"float_param_regs",
"forall_rpair",
"int_arg",
"int_param_regs",
"is_callee_save",
"list_nth_z",
"list_nth_z_in",
"loc",
"loc_argument_acceptable",
"loc_arguments_rec",
"loc_arguments_stack",
"rpair",
... | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
loc_arguments_acceptable:
forall (s: signature) (p: rpair loc),
In p (loc_arguments s) -> forall_rpair loc_argument_acceptable p. | Proof.
unfold loc_arguments; intros.
eapply loc_arguments_rec_charact; eauto. lia.
Qed. | Lemma | loc_arguments_acceptable | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"In",
"forall_rpair",
"loc",
"loc_argument_acceptable",
"loc_arguments",
"loc_arguments_rec_charact",
"rpair",
"signature"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
loc_arguments_main:
loc_arguments signature_main = nil. | Proof.
unfold loc_arguments; reflexivity.
Qed. | Lemma | loc_arguments_main | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"loc_arguments",
"signature_main"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
return_value_needs_normalization (t: xtype) : bool | :=
match Archi.abi with
| Archi.Apple => false
| Archi.AAPCS64 =>
match t with
| Xbool | Xint8signed | Xint8unsigned | Xint16signed | Xint16unsigned => true
| _ => false
end
end. | Definition | return_value_needs_normalization | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"abi",
"xtype"
] | According to the AAPCS64 ABI specification, "padding bits" in the return
value of a function or in a function parameter have unpredictable
values and must be ignored. Consequently, we force normalization
of return values and of function parameters when they have small
integer types (8- and 16-bit integ... | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
parameter_needs_normalization | := return_value_needs_normalization. | Definition | parameter_needs_normalization | aarch64 | aarch64/Conventions1.v | [
"Coqlib",
"Decidableplus",
"AST",
"Events",
"Locations",
"Archi"
] | [
"return_value_needs_normalization"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 | |
mreg: Type | :=
(** Allocatable integer regs *)
| R0 | R1 | R2 | R3 | R4 | R5 | R6 | R7
| R8 | R9 | R10 | R11 | R12 | R13 | R14 | R15
| R17 | R19 | R20 | R21 | R22 | R23
| R24 | R25 | R26 | R27 | R28 | R29
(** Allocatable floating-point regs *)
| F0 | F1 | F2 | F3 | F4 | F5 | F6 | F7
| F8 | F9 | F... | Inductive | mreg | aarch64 | aarch64/Machregs.v | [
"Coq",
"String",
"Coqlib",
"Decidableplus",
"Maps",
"AST",
"Op"
] | [] | Integer register 16 is reserved as temporary and for call veeners.
Integer register 18 is reserved as the platform register.
Integer register 30 is reserved for the return address. | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
mreg_eq: forall (r1 r2: mreg), {r1 = r2} + {r1 <> r2}. | Proof. decide equality. Defined. | Lemma | mreg_eq | aarch64 | aarch64/Machregs.v | [
"Coq",
"String",
"Coqlib",
"Decidableplus",
"Maps",
"AST",
"Op"
] | [
"mreg"
] | https://github.com/AbsInt/CompCert | 0ef26dad76446c803da02d7368eb4f9d074c1401 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.