file_name
stringlengths 5
52
| name
stringlengths 4
95
| original_source_type
stringlengths 0
23k
| source_type
stringlengths 9
23k
| source_definition
stringlengths 9
57.9k
| source
dict | source_range
dict | file_context
stringlengths 0
721k
| dependencies
dict | opens_and_abbrevs
listlengths 2
94
| vconfig
dict | interleaved
bool 1
class | verbose_type
stringlengths 1
7.42k
| effect
stringclasses 118
values | effect_flags
sequencelengths 0
2
| mutual_with
sequencelengths 0
11
| ideal_premises
sequencelengths 0
236
| proof_features
sequencelengths 0
1
| is_simple_lemma
bool 2
classes | is_div
bool 2
classes | is_proof
bool 2
classes | is_simply_typed
bool 2
classes | is_type
bool 2
classes | partial_definition
stringlengths 5
3.99k
| completed_definiton
stringlengths 1
1.63M
| isa_cross_project_example
bool 1
class |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_codegen_success_Check_adx_bmi2_support | val va_codegen_success_Check_adx_bmi2_support : va_dummy:unit -> Tot va_pbool | val va_codegen_success_Check_adx_bmi2_support : va_dummy:unit -> Tot va_pbool | let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 81,
"end_line": 238,
"start_col": 0,
"start_line": 228
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_pbool_and",
"Vale.X64.InsBasic.va_codegen_success_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.InsBasic.va_codegen_success_Cpuid_Adx_Bmi2",
"Vale.X64.InsBasic.va_codegen_success_And64",
"Vale.X64.InsBasic.va_codegen_success_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_ttrue",
"Vale.X64.Decls.va_pbool"
] | [] | false | false | false | true | false | let va_codegen_success_Check_adx_bmi2_support () =
| (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ())
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 524288))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 11))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRbx)
(va_const_opr64 256))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx
)
(va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_code_Check_avx2_support | val va_code_Check_avx2_support : va_dummy:unit -> Tot va_code | val va_code_Check_avx2_support : va_dummy:unit -> Tot va_code | let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 78,
"end_line": 422,
"start_col": 0,
"start_line": 416
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_code | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_Block",
"Vale.X64.Decls.va_CCons",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.InsBasic.va_code_Cpuid_Avx2",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.Decls.va_CNil",
"Vale.X64.Decls.va_code"
] | [] | false | false | false | true | false | let va_code_Check_avx2_support () =
| (va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_CCons (va_code_Cpuid_Avx2 ())
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx)
(va_op_opr64_reg64 rR9))
(va_CNil ()))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_codegen_success_Check_avx_support | val va_codegen_success_Check_avx_support : va_dummy:unit -> Tot va_pbool | val va_codegen_success_Check_avx_support : va_dummy:unit -> Tot va_pbool | let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 15,
"end_line": 344,
"start_col": 0,
"start_line": 335
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_pbool_and",
"Vale.X64.InsBasic.va_codegen_success_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_codegen_success_Cpuid_Avx",
"Vale.X64.InsBasic.va_codegen_success_And64",
"Vale.X64.InsBasic.va_codegen_success_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_ttrue",
"Vale.X64.Decls.va_pbool"
] | [] | false | false | false | true | false | let va_codegen_success_Check_avx_support () =
| (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ())
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 268435456))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 27))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx)
(va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_codegen_success_Check_avx2_support | val va_codegen_success_Check_avx2_support : va_dummy:unit -> Tot va_pbool | val va_codegen_success_Check_avx2_support : va_dummy:unit -> Tot va_pbool | let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 78,
"end_line": 432,
"start_col": 0,
"start_line": 425
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_pbool_and",
"Vale.X64.InsBasic.va_codegen_success_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.InsBasic.va_codegen_success_Cpuid_Avx2",
"Vale.X64.InsBasic.va_codegen_success_And64",
"Vale.X64.Decls.va_ttrue",
"Vale.X64.Decls.va_pbool"
] | [] | false | false | false | true | false | let va_codegen_success_Check_avx2_support () =
| (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ())
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRbx)
(va_const_opr64 32))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx)
(va_op_opr64_reg64 rR9))
(va_ttrue ())))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_wpProof_Check_aesni_support | val va_wpProof_Check_aesni_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_aesni_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_aesni_support ())
([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx;
va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) | val va_wpProof_Check_aesni_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_aesni_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_aesni_support ())
([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx;
va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) | let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 129,
"start_col": 0,
"start_line": 120
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_state",
"Prims.unit",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Prims.Nil",
"Prims._assert",
"Vale.X64.Decls.va_state_eq",
"Vale.X64.Decls.va_update_flags",
"Vale.X64.Decls.va_update_reg64",
"Vale.X64.Decls.va_update_ok",
"Vale.X64.Decls.va_lemma_upd_update",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.X64.State.vale_state",
"Vale.Lib.X64.Cpuid.va_lemma_Check_aesni_support",
"Vale.Lib.X64.Cpuid.va_code_Check_aesni_support"
] | [] | false | false | false | false | false | let va_wpProof_Check_aesni_support va_s0 va_k =
| let va_sM, va_f0 = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
(va_update_flags va_sM
(va_update_reg64 rR9
va_sM
(va_update_reg64 rRdx
va_sM
(va_update_reg64 rRcx
va_sM
(va_update_reg64 rRbx
va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax
])
va_sM
va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_lemma_Check_aesni_support | val va_lemma_Check_aesni_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_aesni_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ va_get_reg64 rRbx
va_sM == va_get_reg64 rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64
rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | val va_lemma_Check_aesni_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_aesni_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ va_get_reg64 rRbx
va_sM == va_get_reg64 rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64
rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 116,
"start_col": 0,
"start_line": 101
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state
-> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.fuel",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Vale.X64.Decls.va_fuel",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.QuickCode.va_Mod_ok",
"Prims.Nil",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.list",
"Vale.X64.QuickCode.__proj__QProc__item__mods",
"Vale.Lib.X64.Cpuid.va_code_Check_aesni_support",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.tuple3",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCodes.va_wp_sound_code_norm",
"Prims.l_and",
"Vale.X64.QuickCodes.label",
"Vale.X64.QuickCodes.va_range1",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Prims.l_imp",
"Prims.l_not",
"Prims.int",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.CPU_Features_s.aesni_enabled",
"Vale.X64.CPU_Features_s.pclmulqdq_enabled",
"Vale.Def.Types_s.nat64",
"Vale.X64.QuickCode.quickCode",
"Vale.Lib.X64.Cpuid.va_qcode_Check_aesni_support"
] | [] | false | false | false | false | false | let va_lemma_Check_aesni_support va_b0 va_s0 =
| let va_mods:va_mods_t =
[
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
]
in
let va_qc = va_qcode_Check_aesni_support va_mods in
let va_sM, va_fM, va_g =
va_wp_sound_code_norm (va_code_Check_aesni_support ())
va_qc
va_s0
(fun va_s0 va_sM va_g ->
let () = va_g in
label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0))
in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
])
va_sM
va_s0;
(va_sM, va_fM) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_code_Check_movbe_support | val va_code_Check_movbe_support : va_dummy:unit -> Tot va_code | val va_code_Check_movbe_support : va_dummy:unit -> Tot va_code | let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 79,
"end_line": 502,
"start_col": 0,
"start_line": 495
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_code | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_Block",
"Vale.X64.Decls.va_CCons",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_code_Cpuid_Movbe",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_CNil",
"Vale.X64.Decls.va_code"
] | [] | false | false | false | true | false | let va_code_Check_movbe_support () =
| (va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_CCons (va_code_Cpuid_Movbe ())
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 4194304))
(va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 21))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx)
(va_op_opr64_reg64 rR9))
(va_CNil ())))))))))) | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.deserialize_hash_vv | val deserialize_hash_vv
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
: HST.ST (bool & uint32_t & hash_vv hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> modifies B.loc_none h0 h1)) | val deserialize_hash_vv
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
: HST.ST (bool & uint32_t & hash_vv hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> modifies B.loc_none h0 h1)) | let deserialize_hash_vv
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash_vv hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> modifies B.loc_none h0 h1))
= if not ok || pos >= sz then (false, pos, V.alloc_empty hash_vec)
else begin
let ok, pos, n = deserialize_uint32_t ok buf sz pos in
if not ok then (false, pos, V.alloc_empty hash_vec)
else if n = 0ul then (true, pos, V.alloc_empty hash_vec)
else begin
let rg = hvreg hash_size in
let res = V.alloc n (rg_dummy rg) in
let ok, pos = deserialize_hash_vv_i ok buf sz r pos res 0ul in
(ok, pos, res)
end
end | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 5,
"end_line": 389,
"start_col": 8,
"start_line": 372
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monotonic.HyperHeap
module B = LowStar.Buffer
module CB = LowStar.ConstBuffer
module V = LowStar.Vector
module RV = LowStar.RVector
module RVI = LowStar.Regional.Instances
module U16 = FStar.UInt16
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U8 = FStar.UInt8
open MerkleTree.Low.Datastructures
open MerkleTree.Low.Hashfunctions
module MTS = MerkleTree.Spec
let uint8_t = U8.t
let uint16_t = U16.t
let uint32_t = U32.t
let uint64_t = U64.t
let uint8_p = B.buffer uint8_t
type const_uint8_p = const_pointer uint8_t
#reset-options "--z3rlimit 5 --initial_fuel 0 --max_fuel 0 --initial_ifuel 0 --max_ifuel 0"
private let serialize_bool (ok:bool) (x:bool) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
B.upd buf pos (if x then 1uy else 0uy);
(true, pos + 1ul)
end
private let serialize_uint8_t (ok:bool) (x:uint8_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin B.upd buf pos x;
(true, pos + 1ul)
end
private let serialize_uint16_t (ok:bool) (x:uint16_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint8_t ok (Int.Cast.uint16_to_uint8 (U16.shift_right x 8ul)) buf sz pos in
serialize_uint8_t ok (Int.Cast.uint16_to_uint8 x) buf sz pos
private let serialize_uint32_t (ok:bool) (x:uint32_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint16_t ok (Int.Cast.uint32_to_uint16 (U32.shift_right x 16ul)) buf sz pos in
serialize_uint16_t ok (Int.Cast.uint32_to_uint16 x) buf sz pos
private let serialize_uint64_t (ok:bool) (x:uint64_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint32_t ok (Int.Cast.uint64_to_uint32 (U64.shift_right x 32ul)) buf sz pos in
serialize_uint32_t ok (Int.Cast.uint64_to_uint32 x) buf sz pos
private let serialize_offset_t = serialize_uint64_t
private let serialize_index_t = serialize_uint32_t
private let rec serialize_hash_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < hash_size})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else let b = x.(i) in
let ok, pos = serialize_uint8_t ok (Lib.RawIntTypes.u8_to_UInt8 b) buf sz pos in
let j = i + 1ul in
if j < hash_size then serialize_hash_i #hash_size ok x buf sz pos j
else (ok, pos)
private
let serialize_hash
(#hash_size:hash_size_t)
(ok:bool) (x:hash #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else serialize_hash_i ok x buf sz pos 0ul
private inline_for_extraction
let u64_add_fits (x:uint64_t) (y:uint64_t): Tot (r:bool{r ==> UInt.size (U64.v x + U64.v y) 64}) = uint64_max - x >= y
#push-options "--z3rlimit 100 --fuel 1 --quake 1/3"
private inline_for_extraction
let hash_vec_bytes
(#hash_size:hash_size_t)
(v:hash_vec #hash_size)
: Tot uint64_t
= let vs_hs = U64.mul (u32_64 (V.size_of v)) (u32_64 hash_size) in
if u64_add_fits vs_hs 4UL then vs_hs + 4UL else uint64_max
#pop-options
private
let rec serialize_hash_vec_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vec #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ loc_disjoint (B.loc_buffer buf) (loc_rvector x)))
(ensures (fun h0 _ h1 -> RV.rv_inv h1 x /\ modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let vi = V.index x i in
let ok, pos = serialize_hash ok vi buf sz pos in
let j = i + 1ul in
if j < V.size_of x then serialize_hash_vec_i ok x buf sz pos j
else (ok, pos)
end
private
let serialize_hash_vec
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vec #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvreg hash_size) x)))
(ensures (fun h0 _ h1 -> RV.rv_inv h1 x /\ modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let h0 = HST.get() in
let ok, pos = serialize_uint32_t ok (V.size_of x) buf sz pos in
let h1 = HST.get() in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
if ok && V.size_of x > 0ul then serialize_hash_vec_i ok x buf sz pos 0ul
else (ok, pos)
end
private inline_for_extraction
let rec hash_vv_bytes_i
(#hash_size:hash_size_t)
(vv:hash_vv hash_size)
(i:uint32_t)
: HST.ST uint64_t
(requires (fun h0 -> V.live h0 vv))
(ensures (fun h0 _ h1 -> h0 == h1))
= if i >= V.size_of vv then 4UL
else begin
let vvi = V.index vv i in
let r = hash_vec_bytes vvi in
let rest = hash_vv_bytes_i vv (i+1ul) in
if u64_add_fits r rest then begin
assert (UInt.size (U64.v r + U64.v rest) 64);
r + rest
end
else uint64_max
end
private inline_for_extraction
let hash_vv_bytes
(#hash_size:hash_size_t)
(vv:hash_vv hash_size {V.size_of vv = merkle_tree_size_lg})
: HST.ST uint64_t
(requires (fun h0 -> V.live h0 vv))
(ensures (fun h0 _ h1 -> h0 == h1))
= hash_vv_bytes_i vv 0ul
private
let rec serialize_hash_vv_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vv hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvvreg hash_size) x)))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let vi = V.index x i in
let h0 = HST.get() in
let ok, pos = serialize_hash_vec #hash_size ok vi buf sz pos in
let h1 = HST.get() in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
let j = i + 1ul in
if j < V.size_of x then
serialize_hash_vv_i #hash_size ok x buf sz pos j
else (ok, pos)
end
private
let serialize_hash_vv
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vv hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvvreg hash_size) x)))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let h0 = HST.get() in
let ok, pos = serialize_uint32_t ok (V.size_of x) buf sz pos in
let h1 = HST.get() in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
if (V.size_of x > 0ul) then serialize_hash_vv_i ok x buf sz pos 0ul
else (ok, pos)
end
private
let deserialize_bool (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & bool)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, false)
else (true, pos + 1ul, (match CB.index buf pos with| 0uy -> false | _ -> true))
private
let deserialize_uint8_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint8_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0uy)
else (true, pos + 1ul, CB.index buf pos)
private
let deserialize_uint16_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint16_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0us)
else begin
let ok, pos, b0 = deserialize_uint8_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint8_t ok buf sz pos in
(ok, pos, (U16.shift_left (Int.Cast.uint8_to_uint16 b0) 8ul) + Int.Cast.uint8_to_uint16 b1)
end
private
let deserialize_uint32_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint32_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0ul)
else begin
let ok, pos, b0 = deserialize_uint16_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint16_t ok buf sz pos in
(ok, pos, (U32.shift_left (Int.Cast.uint16_to_uint32 b0) 16ul) + Int.Cast.uint16_to_uint32 b1)
end
private
let deserialize_uint64_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint64_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0UL)
else begin
let ok, pos, b0 = deserialize_uint32_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint32_t ok buf sz pos in
(ok, pos, (U64.shift_left (u32_64 b0) 32ul) + u32_64 b1)
end
private let deserialize_offset_t = deserialize_uint64_t
private let deserialize_index_t = deserialize_uint32_t
private
let deserialize_hash
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 (k, _, h) h1 -> (k ==> Rgl?.r_inv (hreg hash_size) h1 h) /\
loc_disjoint (loc_buffer (CB.cast buf)) (loc_buffer h) /\
modifies B.loc_none h0 h1))
= let rg = hreg hash_size in
if not ok || pos >= sz then (false, pos, rg_dummy rg)
else if sz - pos < hash_size then (false, pos, rg_dummy rg)
else begin
let hash = rg_alloc rg r in
Lib.RawBuffer.blit (CB.cast buf) pos hash 0ul hash_size;
(true, pos + hash_size, hash)
end
private
let rec deserialize_hash_vec_i
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t) (res:hash_vec #hash_size) (i:uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> CB.live h0 buf /\ V.live h0 res))
(ensures (fun h0 _ h1 -> B.modifies (B.loc_buffer (V.Vec?.vs res)) h0 h1))
= if not ok || pos >= sz then (false, pos)
else begin
let ok, pos, h = deserialize_hash ok buf sz r pos in
if not ok then (false, pos)
else begin
V.assign res i h;
(*
* AR: 04/01: The call deserialize_hash_vec_i below needs liveness of buf
* So we have to frame buf liveness for the V.assign call
* V.assign provides a modifies postcondition in terms of
* loc_vector_within, which is a recursive predicate and
* I guess hard to reason about directly
* Whereas to reason about liveness of buf, we only need an
* overapproximation that V.assign modifies V.Vec?.vs res
* Looking at the Vector library, I found the following lemma
* that does the trick
*)
V.loc_vector_within_included res i (i + 1ul);
let j = i + 1ul in
if j < V.size_of res then deserialize_hash_vec_i ok buf sz r pos res j
else (true, pos)
end
end
private
let deserialize_hash_vec
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash_vec #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> B.modifies B.loc_none h0 h1))
= let rg = hvreg hash_size in
if not ok || pos >= sz then (false, pos, rg_dummy rg)
else begin
let ok, pos, n = deserialize_uint32_t ok buf sz pos in
if not ok then (false, pos, V.alloc_empty hash)
else if n = 0ul then (true, pos, V.alloc_empty hash)
else begin
let hrg = hreg hash_size in
let res = V.alloc n (rg_dummy hrg) in
let ok, pos = deserialize_hash_vec_i ok buf sz r pos res 0ul in
(ok, pos, res)
end
end
private
let rec deserialize_hash_vv_i
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t) (res:hash_vv hash_size) (i:uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> CB.live h0 buf /\ V.live h0 res /\
B.loc_disjoint (CB.loc_buffer buf) (V.loc_vector res)))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer (V.Vec?.vs res)) h0 h1))
=
if not ok || pos >= sz then (false, 0ul)
else begin
let ok, pos, hv = deserialize_hash_vec ok buf sz r pos in
let h0 = HST.get() in
if not ok then (false, pos)
else begin
V.assign res i hv;
(*
* AR: 04/01: The call deserialize_hash_vv_i below needs liveness of buf
* So we have to frame buf liveness for the V.assign call
* V.assign provides a modifies postcondition in terms of
* loc_vector_within, which is a recursive predicate and
* I guess hard to reason about directly
* Whereas to reason about liveness of buf, we only need an
* overapproximation that V.assign modifies V.Vec?.vs res
* Looking at the Vector library, I found the following lemma
* that does the trick
*)
V.loc_vector_within_included res i (i + 1ul);
let j = i + 1ul in
if j = V.size_of res then (true, pos)
else deserialize_hash_vv_i ok buf sz r pos res j
end
end | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Regional.Instances.fst.checked",
"LowStar.Regional.fst.checked",
"LowStar.Modifies.fst.checked",
"LowStar.ConstBuffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.RawBuffer.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt16.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Monotonic.HyperHeap.fsti.checked",
"FStar.Integers.fst.checked",
"FStar.Int.Cast.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "MerkleTree.Low.Serialization.fst"
} | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt8",
"short_module": "U8"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.UInt16",
"short_module": "U16"
},
{
"abbrev": true,
"full_module": "LowStar.Regional.Instances",
"short_module": "RVI"
},
{
"abbrev": true,
"full_module": "LowStar.RVector",
"short_module": "RV"
},
{
"abbrev": true,
"full_module": "LowStar.Vector",
"short_module": "V"
},
{
"abbrev": true,
"full_module": "LowStar.ConstBuffer",
"short_module": "CB"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.Monotonic.HyperHeap",
"short_module": "HH"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Regional.Instances",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Regional",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.RVector",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Vector",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Modifies",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
ok: Prims.bool ->
buf: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint32_t{LowStar.ConstBuffer.length buf = FStar.UInt32.v sz} ->
r: FStar.HyperStack.ST.erid ->
pos: MerkleTree.Low.Serialization.uint32_t
-> FStar.HyperStack.ST.ST
((Prims.bool * MerkleTree.Low.Serialization.uint32_t) *
MerkleTree.Low.Datastructures.hash_vv hash_size) | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.Datastructures.hash_size_t",
"Prims.bool",
"MerkleTree.Low.Serialization.const_uint8_p",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt32.n",
"LowStar.ConstBuffer.length",
"MerkleTree.Low.Serialization.uint8_t",
"FStar.UInt32.v",
"FStar.HyperStack.ST.erid",
"Prims.op_BarBar",
"Prims.op_Negation",
"FStar.Integers.op_Greater_Equals",
"FStar.Integers.Unsigned",
"FStar.Integers.W32",
"FStar.Pervasives.Native.Mktuple3",
"MerkleTree.Low.Datastructures.hash_vv",
"LowStar.Vector.alloc_empty",
"MerkleTree.Low.Datastructures.hash_vec",
"FStar.Pervasives.Native.tuple3",
"FStar.UInt32.t",
"FStar.UInt32.__uint_to_t",
"FStar.Pervasives.Native.tuple2",
"MerkleTree.Low.Serialization.deserialize_hash_vv_i",
"LowStar.Vector.vector",
"LowStar.Vector.alloc",
"LowStar.Regional.rg_dummy",
"LowStar.Regional.regional",
"MerkleTree.Low.Datastructures.hvreg",
"MerkleTree.Low.Serialization.deserialize_uint32_t",
"FStar.Monotonic.HyperStack.mem",
"LowStar.ConstBuffer.live",
"LowStar.Monotonic.Buffer.modifies",
"LowStar.Monotonic.Buffer.loc_none"
] | [] | false | true | false | false | false | let deserialize_hash_vv
(#hash_size: hash_size_t)
(ok: bool)
(buf: const_uint8_p)
(sz: uint32_t{CB.length buf = U32.v sz})
(r: HST.erid)
(pos: uint32_t)
: HST.ST (bool & uint32_t & hash_vv hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> modifies B.loc_none h0 h1)) =
| if not ok || pos >= sz
then (false, pos, V.alloc_empty hash_vec)
else
let ok, pos, n = deserialize_uint32_t ok buf sz pos in
if not ok
then (false, pos, V.alloc_empty hash_vec)
else
if n = 0ul
then (true, pos, V.alloc_empty hash_vec)
else
let rg = hvreg hash_size in
let res = V.alloc n (rg_dummy rg) in
let ok, pos = deserialize_hash_vv_i ok buf sz r pos res 0ul in
(ok, pos, res) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_lemma_Check_sha_support | val va_lemma_Check_sha_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_sha_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ va_get_reg64 rRbx va_sM == va_get_reg64 rRbx
va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64
rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))))) | val va_lemma_Check_sha_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_sha_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ va_get_reg64 rRbx va_sM == va_get_reg64 rRbx
va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64
rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))))) | let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 197,
"start_col": 0,
"start_line": 182
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (())))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state
-> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.fuel",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Vale.X64.Decls.va_fuel",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.QuickCode.va_Mod_ok",
"Prims.Nil",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.list",
"Vale.X64.QuickCode.__proj__QProc__item__mods",
"Vale.Lib.X64.Cpuid.va_code_Check_sha_support",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.tuple3",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCodes.va_wp_sound_code_norm",
"Prims.l_and",
"Vale.X64.QuickCodes.label",
"Vale.X64.QuickCodes.va_range1",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Prims.l_imp",
"Prims.l_not",
"Prims.int",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.CPU_Features_s.sha_enabled",
"Vale.Def.Types_s.nat64",
"Vale.X64.QuickCode.quickCode",
"Vale.Lib.X64.Cpuid.va_qcode_Check_sha_support"
] | [] | false | false | false | false | false | let va_lemma_Check_sha_support va_b0 va_s0 =
| let va_mods:va_mods_t =
[
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
]
in
let va_qc = va_qcode_Check_sha_support va_mods in
let va_sM, va_fM, va_g =
va_wp_sound_code_norm (va_code_Check_sha_support ())
va_qc
va_s0
(fun va_s0 va_sM va_g ->
let () = va_g in
label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0))
in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
])
va_sM
va_s0;
(va_sM, va_fM) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_codegen_success_Check_movbe_support | val va_codegen_success_Check_movbe_support : va_dummy:unit -> Tot va_pbool | val va_codegen_success_Check_movbe_support : va_dummy:unit -> Tot va_pbool | let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 79,
"end_line": 513,
"start_col": 0,
"start_line": 505
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_pbool_and",
"Vale.X64.InsBasic.va_codegen_success_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_codegen_success_Cpuid_Movbe",
"Vale.X64.InsBasic.va_codegen_success_And64",
"Vale.X64.InsBasic.va_codegen_success_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_ttrue",
"Vale.X64.Decls.va_pbool"
] | [] | false | false | false | true | false | let va_codegen_success_Check_movbe_support () =
| (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ())
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 4194304))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 21))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx)
(va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_qcode_Check_aesni_support | val va_qcode_Check_aesni_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_aesni_support ())) | val va_qcode_Check_aesni_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_aesni_support ())) | let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 98,
"start_col": 0,
"start_line": 51
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_mods: Vale.X64.QuickCode.va_mods_t
-> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.Lib.X64.Cpuid.va_code_Check_aesni_support ()) | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.QuickCode.va_mods_t",
"Vale.X64.QuickCodes.qblock",
"Prims.unit",
"Prims.Cons",
"Vale.X64.Decls.va_code",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_code_Cpuid_AES",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Prims.Nil",
"Vale.X64.Machine_s.precode",
"Vale.X64.Decls.ins",
"Vale.X64.Decls.ocmp",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.va_QSeq",
"Vale.X64.QuickCodes.va_range1",
"Vale.X64.InsBasic.va_quick_Mov64",
"Vale.X64.QuickCodes.va_QBind",
"Vale.X64.InsBasic.va_quick_Cpuid_AES",
"Vale.X64.QuickCodes.va_qPURE",
"Prims.pure_post",
"Prims.l_and",
"Prims.l_True",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Vale.Def.Types_s.iand",
"Prims.op_GreaterThan",
"Prims.op_GreaterThanOrEqual",
"Vale.Arch.TypesNative.lemma_iand_pow2_64",
"Vale.X64.InsBasic.va_quick_And64",
"Vale.X64.QuickCodes.va_QLemma",
"FStar.Pervasives.normalize",
"Prims.squash",
"Vale.Lib.Basic.assert_normalize",
"Vale.X64.InsBasic.va_quick_Shr64",
"Prims.op_LessThanOrEqual",
"Vale.Def.Types_s.ishr",
"Prims.op_Subtraction",
"Vale.Arch.TypesNative.lemma_ishr_pow2_diff64",
"Vale.Arch.TypesNative.lemma_ishr_zero64",
"Prims.l_iff",
"Prims.op_Negation",
"Prims.op_Equality",
"Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64",
"Vale.X64.QuickCodes.va_QEmpty",
"Vale.Def.Words_s.nat64",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.QuickCodes.quickCodes",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCode.va_quickCode",
"Vale.Lib.X64.Cpuid.va_code_Check_aesni_support"
] | [] | false | false | false | false | false | let va_qcode_Check_aesni_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_aesni_support ())) =
| (qblock va_mods
(fun (va_s: va_state) ->
let va_old_s:va_state = va_s in
va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ())
(fun (va_s: va_state) _ ->
let va_arg22:Vale.Def.Types_s.nat64 = va_get_reg64 rRcx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25)
(let va_arg21:Vale.Def.Types_s.nat64 = va_get_reg64 rRcx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 33554432))
(fun (va_s: va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (33554432 ==
Prims.pow2 25))
(fun _ ->
(fun (p: prop) -> p) (33554432 == Prims.pow2 25))
(fun (_: unit) ->
assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (2 == Prims.pow2 1
))
(fun _ -> (fun (p: prop) -> p) (2 == Prims.pow2 1)
)
(fun (_: unit) ->
assert_normalize (2 == Prims.pow2 1))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 24))
(fun (va_s: va_state) _ ->
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
1
25)
(va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_zero64
24)
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64
rRcx)
(va_const_opr64 2))
(fun (va_s: va_state) _ ->
let va_arg20:Vale.Def.Types_s.nat64
=
va_get_reg64 rRcx va_s
in
let va_arg19:Vale.Def.Types_s.nat64
=
va_get_reg64 rRax va_s
in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64
va_arg19
va_arg20
1)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64
rRax)
(va_op_opr64_reg64
rRcx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64
rRbx)
(va_op_opr64_reg64
rR9))
(va_QEmpty (()))))
)))))))))))))))) | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.mt_deserialize_path | val mt_deserialize_path:
rid:HST.erid -> input:const_uint8_p -> sz:uint64_t{CB.length input = U64.v sz}
-> HST.ST (B.pointer_or_null path)
(requires (fun h0 -> CB.live h0 input /\ HS.disjoint rid (B.frameOf (CB.cast input))))
(ensures (fun h0 r h1 -> modifies B.loc_none h0 h1)) | val mt_deserialize_path:
rid:HST.erid -> input:const_uint8_p -> sz:uint64_t{CB.length input = U64.v sz}
-> HST.ST (B.pointer_or_null path)
(requires (fun h0 -> CB.live h0 input /\ HS.disjoint rid (B.frameOf (CB.cast input))))
(ensures (fun h0 r h1 -> modifies B.loc_none h0 h1)) | let mt_deserialize_path rid input sz =
let sz = FStar.Int.Cast.uint64_to_uint32 sz in
let hvvrid = HST.new_region rid in
let ok, pos, hash_size = deserialize_uint32_t true input sz 0ul in
if not ok || hash_size = 0ul then B.null #path
else
let ok, pos, hs = deserialize_hash_vec #hash_size ok input sz hvvrid pos in
begin
if not ok
then (B.null #path)
else (B.malloc rid (Path hash_size hs) 1ul)
end | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 7,
"end_line": 521,
"start_col": 0,
"start_line": 510
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monotonic.HyperHeap
module B = LowStar.Buffer
module CB = LowStar.ConstBuffer
module V = LowStar.Vector
module RV = LowStar.RVector
module RVI = LowStar.Regional.Instances
module U16 = FStar.UInt16
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U8 = FStar.UInt8
open MerkleTree.Low.Datastructures
open MerkleTree.Low.Hashfunctions
module MTS = MerkleTree.Spec
let uint8_t = U8.t
let uint16_t = U16.t
let uint32_t = U32.t
let uint64_t = U64.t
let uint8_p = B.buffer uint8_t
type const_uint8_p = const_pointer uint8_t
#reset-options "--z3rlimit 5 --initial_fuel 0 --max_fuel 0 --initial_ifuel 0 --max_ifuel 0"
private let serialize_bool (ok:bool) (x:bool) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
B.upd buf pos (if x then 1uy else 0uy);
(true, pos + 1ul)
end
private let serialize_uint8_t (ok:bool) (x:uint8_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin B.upd buf pos x;
(true, pos + 1ul)
end
private let serialize_uint16_t (ok:bool) (x:uint16_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint8_t ok (Int.Cast.uint16_to_uint8 (U16.shift_right x 8ul)) buf sz pos in
serialize_uint8_t ok (Int.Cast.uint16_to_uint8 x) buf sz pos
private let serialize_uint32_t (ok:bool) (x:uint32_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint16_t ok (Int.Cast.uint32_to_uint16 (U32.shift_right x 16ul)) buf sz pos in
serialize_uint16_t ok (Int.Cast.uint32_to_uint16 x) buf sz pos
private let serialize_uint64_t (ok:bool) (x:uint64_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint32_t ok (Int.Cast.uint64_to_uint32 (U64.shift_right x 32ul)) buf sz pos in
serialize_uint32_t ok (Int.Cast.uint64_to_uint32 x) buf sz pos
private let serialize_offset_t = serialize_uint64_t
private let serialize_index_t = serialize_uint32_t
private let rec serialize_hash_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < hash_size})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else let b = x.(i) in
let ok, pos = serialize_uint8_t ok (Lib.RawIntTypes.u8_to_UInt8 b) buf sz pos in
let j = i + 1ul in
if j < hash_size then serialize_hash_i #hash_size ok x buf sz pos j
else (ok, pos)
private
let serialize_hash
(#hash_size:hash_size_t)
(ok:bool) (x:hash #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else serialize_hash_i ok x buf sz pos 0ul
private inline_for_extraction
let u64_add_fits (x:uint64_t) (y:uint64_t): Tot (r:bool{r ==> UInt.size (U64.v x + U64.v y) 64}) = uint64_max - x >= y
#push-options "--z3rlimit 100 --fuel 1 --quake 1/3"
private inline_for_extraction
let hash_vec_bytes
(#hash_size:hash_size_t)
(v:hash_vec #hash_size)
: Tot uint64_t
= let vs_hs = U64.mul (u32_64 (V.size_of v)) (u32_64 hash_size) in
if u64_add_fits vs_hs 4UL then vs_hs + 4UL else uint64_max
#pop-options
private
let rec serialize_hash_vec_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vec #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ loc_disjoint (B.loc_buffer buf) (loc_rvector x)))
(ensures (fun h0 _ h1 -> RV.rv_inv h1 x /\ modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let vi = V.index x i in
let ok, pos = serialize_hash ok vi buf sz pos in
let j = i + 1ul in
if j < V.size_of x then serialize_hash_vec_i ok x buf sz pos j
else (ok, pos)
end
private
let serialize_hash_vec
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vec #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvreg hash_size) x)))
(ensures (fun h0 _ h1 -> RV.rv_inv h1 x /\ modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let h0 = HST.get() in
let ok, pos = serialize_uint32_t ok (V.size_of x) buf sz pos in
let h1 = HST.get() in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
if ok && V.size_of x > 0ul then serialize_hash_vec_i ok x buf sz pos 0ul
else (ok, pos)
end
private inline_for_extraction
let rec hash_vv_bytes_i
(#hash_size:hash_size_t)
(vv:hash_vv hash_size)
(i:uint32_t)
: HST.ST uint64_t
(requires (fun h0 -> V.live h0 vv))
(ensures (fun h0 _ h1 -> h0 == h1))
= if i >= V.size_of vv then 4UL
else begin
let vvi = V.index vv i in
let r = hash_vec_bytes vvi in
let rest = hash_vv_bytes_i vv (i+1ul) in
if u64_add_fits r rest then begin
assert (UInt.size (U64.v r + U64.v rest) 64);
r + rest
end
else uint64_max
end
private inline_for_extraction
let hash_vv_bytes
(#hash_size:hash_size_t)
(vv:hash_vv hash_size {V.size_of vv = merkle_tree_size_lg})
: HST.ST uint64_t
(requires (fun h0 -> V.live h0 vv))
(ensures (fun h0 _ h1 -> h0 == h1))
= hash_vv_bytes_i vv 0ul
private
let rec serialize_hash_vv_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vv hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvvreg hash_size) x)))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let vi = V.index x i in
let h0 = HST.get() in
let ok, pos = serialize_hash_vec #hash_size ok vi buf sz pos in
let h1 = HST.get() in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
let j = i + 1ul in
if j < V.size_of x then
serialize_hash_vv_i #hash_size ok x buf sz pos j
else (ok, pos)
end
private
let serialize_hash_vv
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vv hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvvreg hash_size) x)))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let h0 = HST.get() in
let ok, pos = serialize_uint32_t ok (V.size_of x) buf sz pos in
let h1 = HST.get() in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
if (V.size_of x > 0ul) then serialize_hash_vv_i ok x buf sz pos 0ul
else (ok, pos)
end
private
let deserialize_bool (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & bool)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, false)
else (true, pos + 1ul, (match CB.index buf pos with| 0uy -> false | _ -> true))
private
let deserialize_uint8_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint8_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0uy)
else (true, pos + 1ul, CB.index buf pos)
private
let deserialize_uint16_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint16_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0us)
else begin
let ok, pos, b0 = deserialize_uint8_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint8_t ok buf sz pos in
(ok, pos, (U16.shift_left (Int.Cast.uint8_to_uint16 b0) 8ul) + Int.Cast.uint8_to_uint16 b1)
end
private
let deserialize_uint32_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint32_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0ul)
else begin
let ok, pos, b0 = deserialize_uint16_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint16_t ok buf sz pos in
(ok, pos, (U32.shift_left (Int.Cast.uint16_to_uint32 b0) 16ul) + Int.Cast.uint16_to_uint32 b1)
end
private
let deserialize_uint64_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint64_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0UL)
else begin
let ok, pos, b0 = deserialize_uint32_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint32_t ok buf sz pos in
(ok, pos, (U64.shift_left (u32_64 b0) 32ul) + u32_64 b1)
end
private let deserialize_offset_t = deserialize_uint64_t
private let deserialize_index_t = deserialize_uint32_t
private
let deserialize_hash
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 (k, _, h) h1 -> (k ==> Rgl?.r_inv (hreg hash_size) h1 h) /\
loc_disjoint (loc_buffer (CB.cast buf)) (loc_buffer h) /\
modifies B.loc_none h0 h1))
= let rg = hreg hash_size in
if not ok || pos >= sz then (false, pos, rg_dummy rg)
else if sz - pos < hash_size then (false, pos, rg_dummy rg)
else begin
let hash = rg_alloc rg r in
Lib.RawBuffer.blit (CB.cast buf) pos hash 0ul hash_size;
(true, pos + hash_size, hash)
end
private
let rec deserialize_hash_vec_i
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t) (res:hash_vec #hash_size) (i:uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> CB.live h0 buf /\ V.live h0 res))
(ensures (fun h0 _ h1 -> B.modifies (B.loc_buffer (V.Vec?.vs res)) h0 h1))
= if not ok || pos >= sz then (false, pos)
else begin
let ok, pos, h = deserialize_hash ok buf sz r pos in
if not ok then (false, pos)
else begin
V.assign res i h;
(*
* AR: 04/01: The call deserialize_hash_vec_i below needs liveness of buf
* So we have to frame buf liveness for the V.assign call
* V.assign provides a modifies postcondition in terms of
* loc_vector_within, which is a recursive predicate and
* I guess hard to reason about directly
* Whereas to reason about liveness of buf, we only need an
* overapproximation that V.assign modifies V.Vec?.vs res
* Looking at the Vector library, I found the following lemma
* that does the trick
*)
V.loc_vector_within_included res i (i + 1ul);
let j = i + 1ul in
if j < V.size_of res then deserialize_hash_vec_i ok buf sz r pos res j
else (true, pos)
end
end
private
let deserialize_hash_vec
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash_vec #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> B.modifies B.loc_none h0 h1))
= let rg = hvreg hash_size in
if not ok || pos >= sz then (false, pos, rg_dummy rg)
else begin
let ok, pos, n = deserialize_uint32_t ok buf sz pos in
if not ok then (false, pos, V.alloc_empty hash)
else if n = 0ul then (true, pos, V.alloc_empty hash)
else begin
let hrg = hreg hash_size in
let res = V.alloc n (rg_dummy hrg) in
let ok, pos = deserialize_hash_vec_i ok buf sz r pos res 0ul in
(ok, pos, res)
end
end
private
let rec deserialize_hash_vv_i
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t) (res:hash_vv hash_size) (i:uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> CB.live h0 buf /\ V.live h0 res /\
B.loc_disjoint (CB.loc_buffer buf) (V.loc_vector res)))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer (V.Vec?.vs res)) h0 h1))
=
if not ok || pos >= sz then (false, 0ul)
else begin
let ok, pos, hv = deserialize_hash_vec ok buf sz r pos in
let h0 = HST.get() in
if not ok then (false, pos)
else begin
V.assign res i hv;
(*
* AR: 04/01: The call deserialize_hash_vv_i below needs liveness of buf
* So we have to frame buf liveness for the V.assign call
* V.assign provides a modifies postcondition in terms of
* loc_vector_within, which is a recursive predicate and
* I guess hard to reason about directly
* Whereas to reason about liveness of buf, we only need an
* overapproximation that V.assign modifies V.Vec?.vs res
* Looking at the Vector library, I found the following lemma
* that does the trick
*)
V.loc_vector_within_included res i (i + 1ul);
let j = i + 1ul in
if j = V.size_of res then (true, pos)
else deserialize_hash_vv_i ok buf sz r pos res j
end
end
private let deserialize_hash_vv
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash_vv hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> modifies B.loc_none h0 h1))
= if not ok || pos >= sz then (false, pos, V.alloc_empty hash_vec)
else begin
let ok, pos, n = deserialize_uint32_t ok buf sz pos in
if not ok then (false, pos, V.alloc_empty hash_vec)
else if n = 0ul then (true, pos, V.alloc_empty hash_vec)
else begin
let rg = hvreg hash_size in
let res = V.alloc n (rg_dummy rg) in
let ok, pos = deserialize_hash_vv_i ok buf sz r pos res 0ul in
(ok, pos, res)
end
end
#push-options "--z3rlimit 10"
val mt_serialize_size: mt:const_mt_p -> HST.ST uint64_t
(requires (fun h0 -> mt_safe h0 (CB.cast mt)))
(ensures (fun _ _ h1 -> mt_safe h1 (CB.cast mt)))
let mt_serialize_size mt =
let mtv = !*(CB.cast mt) in
let hs = MT?.hs mtv in
let rhs_ok = MT?.rhs_ok mtv in
let rhs = MT?.rhs mtv in
let hs_sz = hash_vv_bytes hs in
if hs_sz < uint32_max then
1UL + // format version
4UL + // hash_size
8UL + // offset
4UL + 4UL + // i, j
hs_sz + // hs
1UL + // rhs_ok
hash_vec_bytes rhs + // rhs
u32_64 (MT?.hash_size mtv) // mroot
else
uint64_max
#pop-options
#push-options "--z3rlimit 15 --initial_fuel 1 --max_fuel 1"
val mt_serialize: mt:const_mt_p -> output:uint8_p -> sz:uint64_t -> HST.ST uint64_t
(requires (fun h0 -> mt_safe h0 (CB.cast mt) /\ B.live h0 output /\ B.length output = U64.v sz /\
HS.disjoint (B.frameOf output) (B.frameOf (CB.cast mt))))
(ensures (fun h0 _ h1 -> mt_safe h1 (CB.cast mt) /\ modifies (B.loc_buffer output) h0 h1))
let mt_serialize mt output sz =
let mt = CB.cast mt in
let sz = FStar.Int.Cast.uint64_to_uint32 sz in
let mtv = !*mt in
let h0 = HST.get() in
let ok, pos = serialize_uint8_t true 1uy output sz 0ul in // format version = 1uy
let h1 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h0 h1;
let ok, pos = serialize_uint32_t ok (MT?.hash_size mtv) output sz pos in
let h2 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h1 h2;
let ok, pos = serialize_offset_t ok (MT?.offset mtv) output sz pos in
let h3 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h2 h3;
let ok, pos = serialize_uint32_t ok (MT?.i mtv) output sz pos in
let h4 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h3 h4;
let ok, pos = serialize_uint32_t ok (MT?.j mtv) output sz pos in
let h5 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h4 h5;
let ok, pos = serialize_hash_vv ok (MT?.hs mtv) output sz pos in
let h6 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h5 h6;
let ok, pos = serialize_bool ok (MT?.rhs_ok mtv) output sz pos in
let h7 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h6 h7;
let ok, pos = serialize_hash_vec ok (MT?.rhs mtv) output sz pos in
let h8 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h7 h8;
let ok, pos = serialize_hash ok (MT?.mroot mtv) output sz pos in
let h9 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h8 h9;
if ok then (FStar.Int.Cast.uint32_to_uint64 pos) else 0UL
#pop-options
#push-options "--z3rlimit 15 --initial_fuel 2 --max_fuel 2 --initial_ifuel 1 --max_ifuel 1"
val mt_deserialize:
#hsz:Ghost.erased hash_size_t ->
rid:HST.erid ->
input:const_uint8_p ->
sz:uint64_t{CB.length input = U64.v sz} ->
hash_spec:Ghost.erased(MTS.hash_fun_t #(U32.v (Ghost.reveal hsz))) ->
hash_fun:hash_fun_t #(Ghost.reveal hsz) #hash_spec
-> HST.ST (B.pointer_or_null merkle_tree)
(requires (fun h0 -> CB.live h0 input /\
HS.disjoint rid (B.frameOf (CB.cast input))))
(ensures (fun h0 r h1 -> modifies B.loc_none h0 h1 /\
(not (g_is_null r)) ==> MT?.hash_size (B.get h1 r 0) = Ghost.reveal hsz))
let mt_deserialize #ghsz rid input sz hash_spec hash_fun =
let sz = FStar.Int.Cast.uint64_to_uint32 sz in
let hrid = HST.new_region rid in
let hvrid = HST.new_region rid in
let hvvrid = HST.new_region rid in
let ok, pos, format_version = deserialize_uint8_t true input sz 0ul in
let ok = ok && format_version = 1uy in
let ok, pos, hsz = deserialize_uint32_t ok input sz pos in
if hsz = 0ul then B.null #merkle_tree else begin
let ok, pos, offset = deserialize_offset_t ok input sz pos in
let ok, pos, i = deserialize_index_t ok input sz pos in
let ok, pos, j = deserialize_index_t ok input sz pos in
let ok, pos, hs = deserialize_hash_vv #hsz ok input sz hvvrid pos in
let ok, pos, rhs_ok = deserialize_bool ok input sz pos in
let ok, pos, rhs = deserialize_hash_vec #hsz ok input sz hvrid pos in
let ok, pos, mroot = deserialize_hash #hsz ok input sz hrid pos in
begin
if not ok ||
not (merkle_tree_conditions #hsz offset i j hs rhs_ok rhs mroot)
then B.null #merkle_tree
else begin
assume (hsz = Ghost.reveal ghsz); // We trust the user to provide a suitable hash_fun.
B.malloc rid (MT hsz offset i j hs rhs_ok rhs mroot hash_spec hash_fun) 1ul
end
end
end
val mt_serialize_path: #hsz:Ghost.erased hash_size_t -> p:const_path_p -> output:uint8_p -> sz:uint64_t -> HST.ST uint64_t
(requires (fun h0 -> let ncp = CB.cast p in
let phv = B.get h0 ncp 0 in
Path?.hash_size phv = Ghost.reveal hsz /\
path_safe h0 (B.frameOf (CB.cast p)) ncp /\ RV.rv_inv #(hash #hsz) #hash_size_t #(hreg hsz) h0 (Path?.hashes phv) /\
B.live h0 output /\ B.length output = U64.v sz /\
HS.disjoint (B.frameOf output) (B.frameOf ncp)))
(ensures (fun h0 _ h1 -> path_safe h1 (B.frameOf (CB.cast p)) (CB.cast p) /\
modifies (B.loc_buffer output) h0 h1))
let mt_serialize_path #hsz p output sz =
let hsz = Path?.hash_size !*(CB.cast p) in
let sz = FStar.Int.Cast.uint64_to_uint32 sz in
let ncp = CB.cast p in
let h0 = HST.get() in
let ok, pos = serialize_uint32_t true hsz output sz 0ul in
let h1 = HST.get() in
let ncpd = !*ncp in
let ok, pos = serialize_hash_vec #hsz ok (Path?.hashes ncpd) output sz pos in
if ok then (FStar.Int.Cast.uint32_to_uint64 pos) else 0UL
val mt_deserialize_path:
rid:HST.erid -> input:const_uint8_p -> sz:uint64_t{CB.length input = U64.v sz}
-> HST.ST (B.pointer_or_null path)
(requires (fun h0 -> CB.live h0 input /\ HS.disjoint rid (B.frameOf (CB.cast input)))) | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Regional.Instances.fst.checked",
"LowStar.Regional.fst.checked",
"LowStar.Modifies.fst.checked",
"LowStar.ConstBuffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.RawBuffer.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt16.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Monotonic.HyperHeap.fsti.checked",
"FStar.Integers.fst.checked",
"FStar.Int.Cast.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "MerkleTree.Low.Serialization.fst"
} | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt8",
"short_module": "U8"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.UInt16",
"short_module": "U16"
},
{
"abbrev": true,
"full_module": "LowStar.Regional.Instances",
"short_module": "RVI"
},
{
"abbrev": true,
"full_module": "LowStar.RVector",
"short_module": "RV"
},
{
"abbrev": true,
"full_module": "LowStar.Vector",
"short_module": "V"
},
{
"abbrev": true,
"full_module": "LowStar.ConstBuffer",
"short_module": "CB"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.Monotonic.HyperHeap",
"short_module": "HH"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Regional.Instances",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Regional",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.RVector",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Vector",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Modifies",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 2,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 15,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
rid: FStar.HyperStack.ST.erid ->
input: MerkleTree.Low.Serialization.const_uint8_p ->
sz: MerkleTree.Low.Serialization.uint64_t{LowStar.ConstBuffer.length input = FStar.UInt64.v sz}
-> FStar.HyperStack.ST.ST (LowStar.Buffer.pointer_or_null MerkleTree.Low.path) | FStar.HyperStack.ST.ST | [] | [] | [
"FStar.HyperStack.ST.erid",
"MerkleTree.Low.Serialization.const_uint8_p",
"MerkleTree.Low.Serialization.uint64_t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"Prims.l_or",
"Prims.op_GreaterThanOrEqual",
"FStar.UInt.size",
"FStar.UInt64.n",
"LowStar.ConstBuffer.length",
"MerkleTree.Low.Serialization.uint8_t",
"FStar.UInt64.v",
"Prims.bool",
"MerkleTree.Low.Serialization.uint32_t",
"Prims.op_BarBar",
"Prims.op_Negation",
"FStar.UInt32.t",
"FStar.UInt32.__uint_to_t",
"LowStar.Buffer.null",
"MerkleTree.Low.path",
"LowStar.Buffer.pointer_or_null",
"MerkleTree.Low.Datastructures.hash_vec",
"LowStar.Buffer.malloc",
"MerkleTree.Low.Path",
"LowStar.Monotonic.Buffer.mbuffer",
"LowStar.Buffer.trivial_preorder",
"Prims.l_and",
"Prims.eq2",
"Prims.nat",
"LowStar.Monotonic.Buffer.length",
"FStar.UInt32.v",
"LowStar.Monotonic.Buffer.g_is_null",
"FStar.Monotonic.HyperHeap.rid",
"LowStar.Monotonic.Buffer.frameOf",
"LowStar.Monotonic.Buffer.freeable",
"FStar.Pervasives.Native.tuple3",
"MerkleTree.Low.Serialization.deserialize_hash_vec",
"MerkleTree.Low.Serialization.deserialize_uint32_t",
"FStar.HyperStack.ST.new_region",
"Prims.op_Modulus",
"Prims.pow2",
"FStar.Int.Cast.uint64_to_uint32"
] | [] | false | true | false | false | false | let mt_deserialize_path rid input sz =
| let sz = FStar.Int.Cast.uint64_to_uint32 sz in
let hvvrid = HST.new_region rid in
let ok, pos, hash_size = deserialize_uint32_t true input sz 0ul in
if not ok || hash_size = 0ul
then B.null #path
else
let ok, pos, hs = deserialize_hash_vec #hash_size ok input sz hvvrid pos in
if not ok then (B.null #path) else (B.malloc rid (Path hash_size hs) 1ul) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_qcode_Check_sha_support | val va_qcode_Check_sha_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_sha_support ())) | val va_qcode_Check_sha_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_sha_support ())) | let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (())))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 100,
"end_line": 179,
"start_col": 0,
"start_line": 155
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_mods: Vale.X64.QuickCode.va_mods_t
-> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.Lib.X64.Cpuid.va_code_Check_sha_support ()) | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.QuickCode.va_mods_t",
"Vale.X64.QuickCodes.qblock",
"Prims.unit",
"Prims.Cons",
"Vale.X64.Decls.va_code",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.InsBasic.va_code_Cpuid_Sha",
"Vale.X64.InsBasic.va_code_And64",
"Prims.Nil",
"Vale.X64.Machine_s.precode",
"Vale.X64.Decls.ins",
"Vale.X64.Decls.ocmp",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.va_QSeq",
"Vale.X64.QuickCodes.va_range1",
"Vale.X64.InsBasic.va_quick_Mov64",
"Vale.X64.QuickCodes.va_QBind",
"Vale.X64.InsBasic.va_quick_Cpuid_Sha",
"Vale.X64.QuickCodes.va_qPURE",
"Prims.pure_post",
"Prims.l_and",
"Prims.l_True",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Vale.Def.Types_s.iand",
"Prims.op_GreaterThan",
"Prims.op_GreaterThanOrEqual",
"Vale.Arch.TypesNative.lemma_iand_pow2_64",
"Vale.X64.InsBasic.va_quick_And64",
"Vale.X64.QuickCodes.va_QLemma",
"FStar.Pervasives.normalize",
"Prims.squash",
"Vale.Lib.Basic.assert_normalize",
"Vale.X64.QuickCodes.va_QEmpty",
"Vale.X64.QuickCodes.quickCodes",
"Vale.Def.Words_s.nat64",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCode.va_quickCode",
"Vale.Lib.X64.Cpuid.va_code_Check_sha_support"
] | [] | false | false | false | false | false | let va_qcode_Check_sha_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_sha_support ())) =
| (qblock va_mods
(fun (va_s: va_state) ->
let va_old_s:va_state = va_s in
va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ())
(fun (va_s: va_state) _ ->
let va_arg11:Vale.Def.Types_s.nat64 = va_get_reg64 rRbx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29)
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx)
(va_const_opr64 536870912))
(fun (va_s: va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (536870912 == Prims.pow2 29))
(fun _ -> (fun (p: prop) -> p) (536870912 == Prims.pow2 29))
(fun (_: unit) ->
assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx)
(va_op_opr64_reg64 rR9))
(va_QEmpty (())))))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_code_Check_sse_support | val va_code_Check_sse_support : va_dummy:unit -> Tot va_code | val va_code_Check_sse_support : va_dummy:unit -> Tot va_code | let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 84,
"end_line": 597,
"start_col": 0,
"start_line": 585
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_code | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_Block",
"Vale.X64.Decls.va_CCons",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_code_Cpuid_Sse",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_CNil",
"Vale.X64.Decls.va_code"
] | [] | false | false | false | true | false | let va_code_Check_sse_support () =
| (va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_CCons (va_code_Cpuid_Sse ())
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 524288))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRcx)
(va_const_opr64 512))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRdx)
(va_const_opr64 67108864))
(va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 10))
(va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRdx)
(va_const_shift_amt64 17))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRdx))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax
)
(va_op_opr64_reg64 rRcx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx
)
(va_op_opr64_reg64 rR9))
(va_CNil ()))))))))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_codegen_success_Check_sse_support | val va_codegen_success_Check_sse_support : va_dummy:unit -> Tot va_pbool | val va_codegen_success_Check_sse_support : va_dummy:unit -> Tot va_pbool | let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 84,
"end_line": 613,
"start_col": 0,
"start_line": 600
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_pbool_and",
"Vale.X64.InsBasic.va_codegen_success_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_codegen_success_Cpuid_Sse",
"Vale.X64.InsBasic.va_codegen_success_And64",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.InsBasic.va_codegen_success_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_ttrue",
"Vale.X64.Decls.va_pbool"
] | [] | false | false | false | true | false | let va_codegen_success_Check_sse_support () =
| (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ())
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 524288))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRcx)
(va_const_opr64 512))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRdx)
(va_const_opr64 67108864))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 10))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRdx
)
(va_const_shift_amt64 17))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64
rRax)
(va_op_opr64_reg64 rRdx))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64
rRax)
(va_op_opr64_reg64 rRcx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64
rRbx)
(va_op_opr64_reg64 rR9))
(va_ttrue ())))))))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_code_Check_rdrand_support | val va_code_Check_rdrand_support : va_dummy:unit -> Tot va_code | val va_code_Check_rdrand_support : va_dummy:unit -> Tot va_code | let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 79,
"end_line": 732,
"start_col": 0,
"start_line": 725
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_code | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_Block",
"Vale.X64.Decls.va_CCons",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_code_Cpuid_Rdrand",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_CNil",
"Vale.X64.Decls.va_code"
] | [] | false | false | false | true | false | let va_code_Check_rdrand_support () =
| (va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_CCons (va_code_Cpuid_Rdrand ())
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 1073741824))
(va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 29))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx)
(va_op_opr64_reg64 rR9))
(va_CNil ())))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_wpProof_Check_sha_support | val va_wpProof_Check_sha_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_sha_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_sha_support ()) ([va_Mod_flags;
va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax])
va_s0 va_k ((va_sM, va_f0, va_g)))) | val va_wpProof_Check_sha_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_sha_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_sha_support ()) ([va_Mod_flags;
va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax])
va_s0 va_k ((va_sM, va_f0, va_g)))) | let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 210,
"start_col": 0,
"start_line": 201
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_state",
"Prims.unit",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Prims.Nil",
"Prims._assert",
"Vale.X64.Decls.va_state_eq",
"Vale.X64.Decls.va_update_flags",
"Vale.X64.Decls.va_update_reg64",
"Vale.X64.Decls.va_update_ok",
"Vale.X64.Decls.va_lemma_upd_update",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.X64.State.vale_state",
"Vale.Lib.X64.Cpuid.va_lemma_Check_sha_support",
"Vale.Lib.X64.Cpuid.va_code_Check_sha_support"
] | [] | false | false | false | false | false | let va_wpProof_Check_sha_support va_s0 va_k =
| let va_sM, va_f0 = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
(va_update_flags va_sM
(va_update_reg64 rR9
va_sM
(va_update_reg64 rRdx
va_sM
(va_update_reg64 rRcx
va_sM
(va_update_reg64 rRbx
va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax
])
va_sM
va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_codegen_success_Check_rdrand_support | val va_codegen_success_Check_rdrand_support : va_dummy:unit -> Tot va_pbool | val va_codegen_success_Check_rdrand_support : va_dummy:unit -> Tot va_pbool | let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 15,
"end_line": 744,
"start_col": 0,
"start_line": 735
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_pbool_and",
"Vale.X64.InsBasic.va_codegen_success_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_codegen_success_Cpuid_Rdrand",
"Vale.X64.InsBasic.va_codegen_success_And64",
"Vale.X64.InsBasic.va_codegen_success_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_ttrue",
"Vale.X64.Decls.va_pbool"
] | [] | false | false | false | true | false | let va_codegen_success_Check_rdrand_support () =
| (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ())
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 1073741824))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 29))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx)
(va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_wpProof_Check_adx_bmi2_support | val va_wpProof_Check_adx_bmi2_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_adx_bmi2_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_adx_bmi2_support ())
([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx;
va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) | val va_wpProof_Check_adx_bmi2_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_adx_bmi2_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_adx_bmi2_support ())
([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx;
va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) | let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 319,
"start_col": 0,
"start_line": 310
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_state",
"Prims.unit",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Prims.Nil",
"Prims._assert",
"Vale.X64.Decls.va_state_eq",
"Vale.X64.Decls.va_update_flags",
"Vale.X64.Decls.va_update_reg64",
"Vale.X64.Decls.va_update_ok",
"Vale.X64.Decls.va_lemma_upd_update",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.X64.State.vale_state",
"Vale.Lib.X64.Cpuid.va_lemma_Check_adx_bmi2_support",
"Vale.Lib.X64.Cpuid.va_code_Check_adx_bmi2_support"
] | [] | false | false | false | false | false | let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
| let va_sM, va_f0 = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
(va_update_flags va_sM
(va_update_reg64 rR9
va_sM
(va_update_reg64 rRdx
va_sM
(va_update_reg64 rRcx
va_sM
(va_update_reg64 rRbx
va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax
])
va_sM
va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_lemma_Check_adx_bmi2_support | val va_lemma_Check_adx_bmi2_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_adx_bmi2_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ va_get_reg64 rRbx va_sM ==
va_get_reg64 rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | val va_lemma_Check_adx_bmi2_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_adx_bmi2_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ va_get_reg64 rRbx va_sM ==
va_get_reg64 rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 306,
"start_col": 0,
"start_line": 291
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state
-> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.fuel",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Vale.X64.Decls.va_fuel",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.QuickCode.va_Mod_ok",
"Prims.Nil",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.list",
"Vale.X64.QuickCode.__proj__QProc__item__mods",
"Vale.Lib.X64.Cpuid.va_code_Check_adx_bmi2_support",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.tuple3",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCodes.va_wp_sound_code_norm",
"Prims.l_and",
"Vale.X64.QuickCodes.label",
"Vale.X64.QuickCodes.va_range1",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Prims.l_imp",
"Prims.l_not",
"Prims.int",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.CPU_Features_s.adx_enabled",
"Vale.X64.CPU_Features_s.bmi2_enabled",
"Vale.Def.Types_s.nat64",
"Vale.X64.QuickCode.quickCode",
"Vale.Lib.X64.Cpuid.va_qcode_Check_adx_bmi2_support"
] | [] | false | false | false | false | false | let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
| let va_mods:va_mods_t =
[
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
]
in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let va_sM, va_fM, va_g =
va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ())
va_qc
va_s0
(fun va_s0 va_sM va_g ->
let () = va_g in
label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0))
in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
])
va_sM
va_s0;
(va_sM, va_fM) | false |
Steel.ST.Printf.fst | Steel.ST.Printf.print_lmbuffer_gen | val print_lmbuffer_gen
(#t: Type)
(#fr: frag_t)
(f: stBuf t)
(l: U32.t)
(#tb: Type)
(b: tb)
(p: perm)
(#tv: Type)
(v: tv)
: ST unit
(live_frag fr)
(fun _ -> live_frag fr)
(tb == lmbuffer t l /\ tv == Ghost.erased (Seq.seq t) /\
live_frag fr ==
A.pts_to #t (coerce #_ #(lmbuffer t l) b) p (coerce #_ #(Ghost.erased (Seq.seq t)) v))
(fun _ -> True) | val print_lmbuffer_gen
(#t: Type)
(#fr: frag_t)
(f: stBuf t)
(l: U32.t)
(#tb: Type)
(b: tb)
(p: perm)
(#tv: Type)
(v: tv)
: ST unit
(live_frag fr)
(fun _ -> live_frag fr)
(tb == lmbuffer t l /\ tv == Ghost.erased (Seq.seq t) /\
live_frag fr ==
A.pts_to #t (coerce #_ #(lmbuffer t l) b) p (coerce #_ #(Ghost.erased (Seq.seq t)) v))
(fun _ -> True) | let print_lmbuffer_gen
(#t: Type)
(#fr: frag_t)
(f: stBuf t)
(l: U32.t)
(#tb: Type)
(b: tb)
(p: perm)
(#tv: Type)
(v: tv)
: ST unit (live_frag fr) (fun _ -> live_frag fr)
(tb == lmbuffer t l /\
tv == Ghost.erased (Seq.seq t) /\
live_frag fr == A.pts_to #t (coerce #_ #(lmbuffer t l) b) p (coerce #_ #(Ghost.erased (Seq.seq t)) v))
(fun _ -> True)
= [@inline_let] let b' : lmbuffer t l = coerce b in
let v' : Ghost.erased (Seq.seq t) = coerce v in
let p' : Ghost.erased (lmbuffer t l & perm) = Ghost.hide (b', p) in
rewrite (live_frag fr) (A.pts_to #t (fst p') (snd p') v');
f l _ _ (A.ptr_of b');
rewrite (A.pts_to _ _ _) (live_frag fr) | {
"file_name": "lib/steel/Steel.ST.Printf.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 41,
"end_line": 389,
"start_col": 0,
"start_line": 369
} | (*
Copyright 2008-2022 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module Steel.ST.Printf
/// This module provides Steel.ST imperative printing functions for several
/// primitive Low* types, including
/// -- booleans (%b)
/// -- characters (%c)
/// -- strings (%s)
/// -- machine integers
/// (UInt8.t as %uy, UInt16.t as %us, UInt32.t as %ul, and UInt64.t as %uL;
/// Int8.t as %y, Int16.t as %i, Int32.t as %l , and Int64.t as %L)
/// -- and arrays of these base types formatted
/// as %xN, where N is the format specifier for the array element type
/// e.g., %xuy for buffers of UInt8.t
/// The main function of this module is `printf`
/// There are a few main differences relative to C printf
/// -- The format specifiers are different (see above)
///
/// -- For technical reasons explained below, an extra dummy
/// argument `done` has to be provided at the end for the
/// computation to have any effect.
///
/// E.g., one must write
/// `printf "%b %c" true 'c' done`
/// rather than just
/// `printf "%b %c" true 'c'`
///
/// -- When printing arrays, two arguments must be passed; the
/// length of the array fragment to be formatted and the array
/// itself
///
/// -- When extracted, rather than producing a C `printf` (which
/// does not, e.g., support printing of dynamically sized
/// arrays), our `printf` is specialized to a sequence of calls
/// to primitive printers for each supported type
///
/// Before diving into the technical details of how this module works,
/// you might want to see a sample usage at the very end of this file.
open FStar.Char
open FStar.String
open Steel.ST.Util
module L = FStar.List.Tot
module A = Steel.ST.Array
module U32 = FStar.UInt32
#set-options "--ide_id_info_off"
/// `lmbuffer a l` is
/// - an array of `a`
/// - governed by preorders `r` and `s`
/// - with length `l`
inline_for_extraction
let lmbuffer a l =
b: A.array a {
A.length b == U32.v l
}
/// `StTrivial`: A effect abbreviation for a stateful computation
/// with no precondition, and which does not read or change the state
effect StTrivial (a:Type) =
STT a emp (fun _ -> emp)
/// `StBuf a b`: A effect abbreviation for a stateful computation
/// that may read `b` but does not change the state
///
/// NOTE: I need to provide those primitives operating on
/// Steel.ST.Array.ptr instead of Steel.ST.Array.array, otherwise
/// Karamel will complain about arity mismatch
inline_for_extraction
let stBuf (t:Type) : Type =
(l: U32.t) ->
(p: Ghost.erased (lmbuffer t l & perm)) ->
(x: Ghost.erased (Seq.seq t)) ->
(b: A.ptr t) ->
ST unit
(A.pts_to (fst p) (snd p) x)
(fun _ -> A.pts_to (fst p) (snd p) x)
(A.ptr_of (fst p) == b)
(fun _ -> True)
/// Primitive printers for all the types supported by this module
assume val print_string: string -> StTrivial unit
assume val print_char : char -> StTrivial unit
assume val print_u8 : UInt8.t -> StTrivial unit
assume val print_u16 : UInt16.t -> StTrivial unit
assume val print_u32 : UInt32.t -> StTrivial unit
assume val print_u64 : UInt64.t -> StTrivial unit
assume val print_i8 : Int8.t -> StTrivial unit
assume val print_i16 : Int16.t -> StTrivial unit
assume val print_i32 : Int32.t -> StTrivial unit
assume val print_i64 : Int64.t -> StTrivial unit
assume val print_bool : bool -> StTrivial unit
assume val print_lmbuffer_bool : stBuf bool
assume val print_lmbuffer_char : stBuf char
assume val print_lmbuffer_string : stBuf string
assume val print_lmbuffer_u8 : stBuf UInt8.t
assume val print_lmbuffer_u16 : stBuf UInt16.t
assume val print_lmbuffer_u32 : stBuf UInt32.t
assume val print_lmbuffer_u64 : stBuf UInt64.t
assume val print_lmbuffer_i8 : stBuf Int8.t
assume val print_lmbuffer_i16 : stBuf Int16.t
assume val print_lmbuffer_i32 : stBuf Int32.t
assume val print_lmbuffer_i64 : stBuf Int64.t
/// An attribute to control reduction
noextract irreducible
let __printf_reduce__ = unit
/// Base types supported so far
noextract
type base_typ =
| Bool
| Char
| String
| U8
| U16
| U32
| U64
| I8
| I16
| I32
| I64
/// Argument types are base types and arrays thereof
/// Or polymorphic arguments specified by "%a"
noextract
type arg =
| Base of base_typ
| Array of base_typ
| Any
/// Interpreting a `base_typ` as a type
[@@__printf_reduce__]
noextract
let base_typ_as_type (b:base_typ) : Type0 =
match b with
| Bool -> bool
| Char -> char
| String -> string
| U8 -> FStar.UInt8.t
| U16 -> FStar.UInt16.t
| U32 -> FStar.UInt32.t
| U64 -> FStar.UInt64.t
| I8 -> FStar.Int8.t
| I16 -> FStar.Int16.t
| I32 -> FStar.Int32.t
| I64 -> FStar.Int64.t
/// `fragment`: A format string is parsed into a list of fragments of
/// string literals and other arguments that need to be spliced in
/// (interpolated)
noextract
type fragment =
| Frag of string
| Interpolate of arg
noextract
let fragments = list fragment
/// `parse_format s`:
/// Parses a list of characters in a format string into a list of fragments
/// Or None, in case the format string is invalid
[@@__printf_reduce__]
noextract inline_for_extraction
let rec parse_format
(s:list char)
: Tot (option fragments)
(decreases (L.length s))
= let add_dir (d:arg) (ods : option fragments)
= match ods with
| None -> None
| Some ds -> Some (Interpolate d::ds)
in
let head_buffer (ods:option fragments)
= match ods with
| Some (Interpolate (Base t) :: rest) -> Some (Interpolate (Array t) :: rest)
| _ -> None
in
let cons_frag (c:char) (ods:option fragments)
= match ods with
| Some (Frag s::rest) -> Some (Frag (string_of_list (c :: list_of_string s)) :: rest)
| Some rest -> Some (Frag (string_of_list [c]) :: rest)
| _ -> None
in
match s with
| [] -> Some []
| ['%'] -> None
// %a... polymorphic arguments and preceded by their printers
| '%' :: 'a' :: s' ->
add_dir Any (parse_format s')
// %x... arrays of base types
| '%' :: 'x' :: s' ->
head_buffer (parse_format ('%' :: s'))
// %u ... Unsigned integers
| '%' :: 'u' :: s' -> begin
match s' with
| 'y' :: s'' -> add_dir (Base U8) (parse_format s'')
| 's' :: s'' -> add_dir (Base U16) (parse_format s'')
| 'l' :: s'' -> add_dir (Base U32) (parse_format s'')
| 'L' :: s'' -> add_dir (Base U64) (parse_format s'')
| _ -> None
end
| '%' :: c :: s' -> begin
match c with
| '%' -> cons_frag '%' (parse_format s')
| 'b' -> add_dir (Base Bool) (parse_format s')
| 'c' -> add_dir (Base Char) (parse_format s')
| 's' -> add_dir (Base String) (parse_format s')
| 'y' -> add_dir (Base I8) (parse_format s')
| 'i' -> add_dir (Base I16) (parse_format s')
| 'l' -> add_dir (Base I32) (parse_format s')
| 'L' -> add_dir (Base I64) (parse_format s')
| _ -> None
end
| c :: s' ->
cons_frag c (parse_format s')
/// `parse_format_string`: a wrapper around `parse_format`
[@@__printf_reduce__]
noextract inline_for_extraction
let parse_format_string
(s:string)
: option fragments
= parse_format (list_of_string s)
/// `lift a` lifts the type `a` to a higher universe
noextract
type lift (a:Type u#a) : Type u#(max a b) =
| Lift : a -> lift a
/// `done` is a `unit` in universe 1
noextract
let done : lift unit = Lift u#0 u#1 ()
/// `arg_t`: interpreting an argument as a type
/// (in universe 1) since it is polymorphic in the argument type of Any (%a) printers.
/// GM: Somehow, this needs to be a `let rec` (even if it not really recursive)
/// or print_frags fails to verify. I don't know why; the generated
/// VC and its encoding seem identical (modulo hash consing in the
/// latter).
[@@__printf_reduce__]
noextract
let rec arg_t (a:arg) : Type u#1 =
match a with
| Base t -> lift (base_typ_as_type t)
| Array t -> lift ((l:UInt32.t & lmbuffer (base_typ_as_type t) l) & perm & Ghost.erased (Seq.seq (base_typ_as_type t)))
| Any -> (a:Type0 & (a -> StTrivial unit) & a)
/// `frag_t`: a fragment is either a string literal or a argument to be interpolated
noextract
let frag_t = either string (a:arg & arg_t a)
/// `live_frags h l` is a separation logic predicate asserting ownership of all the arrays in `l`
[@@__printf_reduce__; Steel.Effect.Common.__reduce__]
noextract
let live_frag0 (f: frag_t) : vprop =
match f with
| Inl _ -> emp
| Inr a ->
(match a with
| (| Base _, _ |) -> emp
| (| Any, _ |) -> emp
| (| Array _, Lift ((| _, b |), p, v) |) -> A.pts_to b p v)
[@@__printf_reduce__]
noextract
let live_frag (f: frag_t) : vprop =
live_frag0 f
[@@__printf_reduce__]
noextract
let rec live_frags (l:list frag_t) : vprop =
match l with
| [] -> emp
| a :: q -> live_frag a `star` live_frags q
/// `interpret_frags` interprets a list of fragments as a Steel.ST function type
/// Note `l` is the fragments in L-to-R order (i.e., parsing order)
/// `acc` accumulates the fragment values in reverse order
[@@__printf_reduce__]
noextract
let rec interpret_frags (l:fragments) (acc: list frag_t) : Type u#1 =
match l with
| [] ->
// Always a dummy argument at the end
// Ensures that all cases of this match
// have the same universe, i.e., u#1
lift u#0 u#1 unit
-> STT unit (live_frags acc) (fun _ -> live_frags acc)
| Interpolate (Base t) :: args ->
// Base types are simple: we just take one more argument
x:base_typ_as_type t ->
interpret_frags args (Inr (| Base t, Lift x |) :: acc)
| Interpolate (Array t) :: args ->
// Arrays are implicitly polymorphic in their preorders `r` and `s`
// which is what forces us to be in universe 1
// Note, the length `l` is explicit
l:UInt32.t ->
#p:perm ->
#v:Ghost.erased (Seq.seq (base_typ_as_type t)) ->
b:lmbuffer (base_typ_as_type t) l ->
interpret_frags args (Inr (| Array t, Lift ((| l, b |), p, v) |) :: acc)
| Interpolate Any :: args ->
#a:Type0 ->
p:(a -> StTrivial unit) ->
x:a ->
interpret_frags args (Inr (| Any, (| a, p, x |) |) :: acc)
| Frag s :: args ->
// Literal fragments do not incur an additional argument
// We just accumulate them and recur
interpret_frags args (Inl s :: acc)
/// `normal` A normalization marker with very specific steps enabled
noextract unfold
let normal (#a:Type) (x:a) : a =
FStar.Pervasives.norm
[iota;
zeta;
delta_attr [`%__printf_reduce__; `%BigOps.__reduce__];
delta_only [`%Base?; `%Array?; `%Some?; `%Some?.v; `%list_of_string];
primops;
simplify]
x
/// `coerce`: A utility to trigger extensional equality of types
noextract
let coerce (x:'a{'a == 'b}) : 'b = x
/// `fragment_printer`: The type of a printer of fragments
noextract
let fragment_printer =
(acc:list frag_t)
-> STT unit (live_frags acc) (fun _ -> live_frags acc)
/// `print_frags`: Having accumulated all the pieces of a format
/// string and the arguments to the printed (i.e., the `list frag_t`),
/// this function does the actual work of printing them all using the
/// primitive printers | {
"checked_file": "/",
"dependencies": [
"Steel.ST.Util.fsti.checked",
"Steel.ST.Array.fsti.checked",
"Steel.Effect.Common.fsti.checked",
"prims.fst.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt16.fsti.checked",
"FStar.String.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked",
"FStar.Int8.fsti.checked",
"FStar.Int64.fsti.checked",
"FStar.Int32.fsti.checked",
"FStar.Int16.fsti.checked",
"FStar.Ghost.fsti.checked",
"FStar.Char.fsti.checked",
"FStar.BigOps.fsti.checked"
],
"interface_file": false,
"source_file": "Steel.ST.Printf.fst"
} | [
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Steel.ST.Array",
"short_module": "A"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": false,
"full_module": "Steel.ST.Util",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.String",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Char",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "Steel.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
f: Steel.ST.Printf.stBuf t ->
l: FStar.UInt32.t ->
b: tb ->
p: Steel.FractionalPermission.perm ->
v: tv
-> Steel.ST.Effect.ST Prims.unit | Steel.ST.Effect.ST | [] | [] | [
"Steel.ST.Printf.frag_t",
"Steel.ST.Printf.stBuf",
"FStar.UInt32.t",
"Steel.FractionalPermission.perm",
"Steel.ST.Util.rewrite",
"FStar.Ghost.hide",
"FStar.Set.set",
"Steel.Memory.iname",
"FStar.Set.empty",
"Steel.ST.Array.pts_to",
"FStar.Pervasives.Native.fst",
"Steel.ST.Printf.lmbuffer",
"FStar.Ghost.reveal",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.snd",
"FStar.Seq.Base.seq",
"Steel.ST.Printf.live_frag",
"Prims.unit",
"Steel.ST.Array.ptr_of",
"FStar.Ghost.erased",
"FStar.Pervasives.Native.Mktuple2",
"Steel.ST.Printf.coerce",
"Steel.Effect.Common.vprop",
"Prims.l_and",
"Prims.eq2",
"Prims.l_True"
] | [] | false | true | false | false | false | let print_lmbuffer_gen
(#t: Type)
(#fr: frag_t)
(f: stBuf t)
(l: U32.t)
(#tb: Type)
(b: tb)
(p: perm)
(#tv: Type)
(v: tv)
: ST unit
(live_frag fr)
(fun _ -> live_frag fr)
(tb == lmbuffer t l /\ tv == Ghost.erased (Seq.seq t) /\
live_frag fr ==
A.pts_to #t (coerce #_ #(lmbuffer t l) b) p (coerce #_ #(Ghost.erased (Seq.seq t)) v))
(fun _ -> True) =
| [@@ inline_let ]let b':lmbuffer t l = coerce b in
let v':Ghost.erased (Seq.seq t) = coerce v in
let p':Ghost.erased (lmbuffer t l & perm) = Ghost.hide (b', p) in
rewrite (live_frag fr) (A.pts_to #t (fst p') (snd p') v');
f l _ _ (A.ptr_of b');
rewrite (A.pts_to _ _ _) (live_frag fr) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_codegen_success_Check_avx512_support | val va_codegen_success_Check_avx512_support : va_dummy:unit -> Tot va_pbool | val va_codegen_success_Check_avx512_support : va_dummy:unit -> Tot va_pbool | let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ())))))))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 36,
"end_line": 857,
"start_col": 0,
"start_line": 837
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_pbool_and",
"Vale.X64.InsBasic.va_codegen_success_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.InsBasic.va_codegen_success_Cpuid_Avx512",
"Vale.X64.Machine_s.rR10",
"Vale.X64.Machine_s.rR11",
"Vale.X64.InsBasic.va_codegen_success_And64",
"Vale.X64.InsBasic.va_codegen_success_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_ttrue",
"Vale.X64.Decls.va_pbool"
] | [] | false | false | false | true | false | let va_codegen_success_Check_avx512_support () =
| (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ())
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR10)
(va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR11)
(va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRbx)
(va_const_opr64 65536))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 131072))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR10
)
(va_const_opr64 1073741824))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64
rRax)
(va_const_shift_amt64 1))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64
rR10)
(va_const_shift_amt64 14))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64
rRax)
(va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64
rRbx)
(va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64
rR11)
(va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (
va_op_dst_opr64_reg64 rR11)
(va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax
)
(va_op_opr64_reg64 rR11)
)
(va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64
rRbx)
(va_op_opr64_reg64 rR9
))
(va_ttrue ()))))))))))))
)))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_code_Check_avx512_support | val va_code_Check_avx512_support : va_dummy:unit -> Tot va_code | val va_code_Check_avx512_support : va_dummy:unit -> Tot va_code | let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 90,
"end_line": 834,
"start_col": 0,
"start_line": 816
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_code | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_Block",
"Vale.X64.Decls.va_CCons",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.InsBasic.va_code_Cpuid_Avx512",
"Vale.X64.Machine_s.rR10",
"Vale.X64.Machine_s.rR11",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_CNil",
"Vale.X64.Decls.va_code"
] | [] | false | false | false | true | false | let va_code_Check_avx512_support () =
| (va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_CCons (va_code_Cpuid_Avx512 ())
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR10)
(va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR11)
(va_op_opr64_reg64 rRbx))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx)
(va_const_opr64 65536))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 131072))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rR10)
(va_const_opr64 1073741824))
(va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 1))
(va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rR10
)
(va_const_shift_amt64 14))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax
)
(va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64
rRbx)
(va_const_opr64 2147483648))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64
rR11)
(va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64
rR11)
(va_const_shift_amt64 15))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64
rRax)
(va_op_opr64_reg64 rR10)
)
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64
rRax)
(va_op_opr64_reg64 rR11
))
(va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64
rRbx)
(va_op_opr64_reg64
rR9))
(va_CNil ())))))))))
)))))))))))) | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.mt_serialize_size | val mt_serialize_size: mt:const_mt_p -> HST.ST uint64_t
(requires (fun h0 -> mt_safe h0 (CB.cast mt)))
(ensures (fun _ _ h1 -> mt_safe h1 (CB.cast mt))) | val mt_serialize_size: mt:const_mt_p -> HST.ST uint64_t
(requires (fun h0 -> mt_safe h0 (CB.cast mt)))
(ensures (fun _ _ h1 -> mt_safe h1 (CB.cast mt))) | let mt_serialize_size mt =
let mtv = !*(CB.cast mt) in
let hs = MT?.hs mtv in
let rhs_ok = MT?.rhs_ok mtv in
let rhs = MT?.rhs mtv in
let hs_sz = hash_vv_bytes hs in
if hs_sz < uint32_max then
1UL + // format version
4UL + // hash_size
8UL + // offset
4UL + 4UL + // i, j
hs_sz + // hs
1UL + // rhs_ok
hash_vec_bytes rhs + // rhs
u32_64 (MT?.hash_size mtv) // mroot
else
uint64_max | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 15,
"end_line": 411,
"start_col": 0,
"start_line": 395
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monotonic.HyperHeap
module B = LowStar.Buffer
module CB = LowStar.ConstBuffer
module V = LowStar.Vector
module RV = LowStar.RVector
module RVI = LowStar.Regional.Instances
module U16 = FStar.UInt16
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U8 = FStar.UInt8
open MerkleTree.Low.Datastructures
open MerkleTree.Low.Hashfunctions
module MTS = MerkleTree.Spec
let uint8_t = U8.t
let uint16_t = U16.t
let uint32_t = U32.t
let uint64_t = U64.t
let uint8_p = B.buffer uint8_t
type const_uint8_p = const_pointer uint8_t
#reset-options "--z3rlimit 5 --initial_fuel 0 --max_fuel 0 --initial_ifuel 0 --max_ifuel 0"
private let serialize_bool (ok:bool) (x:bool) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
B.upd buf pos (if x then 1uy else 0uy);
(true, pos + 1ul)
end
private let serialize_uint8_t (ok:bool) (x:uint8_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin B.upd buf pos x;
(true, pos + 1ul)
end
private let serialize_uint16_t (ok:bool) (x:uint16_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint8_t ok (Int.Cast.uint16_to_uint8 (U16.shift_right x 8ul)) buf sz pos in
serialize_uint8_t ok (Int.Cast.uint16_to_uint8 x) buf sz pos
private let serialize_uint32_t (ok:bool) (x:uint32_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint16_t ok (Int.Cast.uint32_to_uint16 (U32.shift_right x 16ul)) buf sz pos in
serialize_uint16_t ok (Int.Cast.uint32_to_uint16 x) buf sz pos
private let serialize_uint64_t (ok:bool) (x:uint64_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint32_t ok (Int.Cast.uint64_to_uint32 (U64.shift_right x 32ul)) buf sz pos in
serialize_uint32_t ok (Int.Cast.uint64_to_uint32 x) buf sz pos
private let serialize_offset_t = serialize_uint64_t
private let serialize_index_t = serialize_uint32_t
private let rec serialize_hash_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < hash_size})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else let b = x.(i) in
let ok, pos = serialize_uint8_t ok (Lib.RawIntTypes.u8_to_UInt8 b) buf sz pos in
let j = i + 1ul in
if j < hash_size then serialize_hash_i #hash_size ok x buf sz pos j
else (ok, pos)
private
let serialize_hash
(#hash_size:hash_size_t)
(ok:bool) (x:hash #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else serialize_hash_i ok x buf sz pos 0ul
private inline_for_extraction
let u64_add_fits (x:uint64_t) (y:uint64_t): Tot (r:bool{r ==> UInt.size (U64.v x + U64.v y) 64}) = uint64_max - x >= y
#push-options "--z3rlimit 100 --fuel 1 --quake 1/3"
private inline_for_extraction
let hash_vec_bytes
(#hash_size:hash_size_t)
(v:hash_vec #hash_size)
: Tot uint64_t
= let vs_hs = U64.mul (u32_64 (V.size_of v)) (u32_64 hash_size) in
if u64_add_fits vs_hs 4UL then vs_hs + 4UL else uint64_max
#pop-options
private
let rec serialize_hash_vec_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vec #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ loc_disjoint (B.loc_buffer buf) (loc_rvector x)))
(ensures (fun h0 _ h1 -> RV.rv_inv h1 x /\ modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let vi = V.index x i in
let ok, pos = serialize_hash ok vi buf sz pos in
let j = i + 1ul in
if j < V.size_of x then serialize_hash_vec_i ok x buf sz pos j
else (ok, pos)
end
private
let serialize_hash_vec
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vec #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvreg hash_size) x)))
(ensures (fun h0 _ h1 -> RV.rv_inv h1 x /\ modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let h0 = HST.get() in
let ok, pos = serialize_uint32_t ok (V.size_of x) buf sz pos in
let h1 = HST.get() in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
if ok && V.size_of x > 0ul then serialize_hash_vec_i ok x buf sz pos 0ul
else (ok, pos)
end
private inline_for_extraction
let rec hash_vv_bytes_i
(#hash_size:hash_size_t)
(vv:hash_vv hash_size)
(i:uint32_t)
: HST.ST uint64_t
(requires (fun h0 -> V.live h0 vv))
(ensures (fun h0 _ h1 -> h0 == h1))
= if i >= V.size_of vv then 4UL
else begin
let vvi = V.index vv i in
let r = hash_vec_bytes vvi in
let rest = hash_vv_bytes_i vv (i+1ul) in
if u64_add_fits r rest then begin
assert (UInt.size (U64.v r + U64.v rest) 64);
r + rest
end
else uint64_max
end
private inline_for_extraction
let hash_vv_bytes
(#hash_size:hash_size_t)
(vv:hash_vv hash_size {V.size_of vv = merkle_tree_size_lg})
: HST.ST uint64_t
(requires (fun h0 -> V.live h0 vv))
(ensures (fun h0 _ h1 -> h0 == h1))
= hash_vv_bytes_i vv 0ul
private
let rec serialize_hash_vv_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vv hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvvreg hash_size) x)))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let vi = V.index x i in
let h0 = HST.get() in
let ok, pos = serialize_hash_vec #hash_size ok vi buf sz pos in
let h1 = HST.get() in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
let j = i + 1ul in
if j < V.size_of x then
serialize_hash_vv_i #hash_size ok x buf sz pos j
else (ok, pos)
end
private
let serialize_hash_vv
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vv hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvvreg hash_size) x)))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let h0 = HST.get() in
let ok, pos = serialize_uint32_t ok (V.size_of x) buf sz pos in
let h1 = HST.get() in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
if (V.size_of x > 0ul) then serialize_hash_vv_i ok x buf sz pos 0ul
else (ok, pos)
end
private
let deserialize_bool (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & bool)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, false)
else (true, pos + 1ul, (match CB.index buf pos with| 0uy -> false | _ -> true))
private
let deserialize_uint8_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint8_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0uy)
else (true, pos + 1ul, CB.index buf pos)
private
let deserialize_uint16_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint16_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0us)
else begin
let ok, pos, b0 = deserialize_uint8_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint8_t ok buf sz pos in
(ok, pos, (U16.shift_left (Int.Cast.uint8_to_uint16 b0) 8ul) + Int.Cast.uint8_to_uint16 b1)
end
private
let deserialize_uint32_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint32_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0ul)
else begin
let ok, pos, b0 = deserialize_uint16_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint16_t ok buf sz pos in
(ok, pos, (U32.shift_left (Int.Cast.uint16_to_uint32 b0) 16ul) + Int.Cast.uint16_to_uint32 b1)
end
private
let deserialize_uint64_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint64_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0UL)
else begin
let ok, pos, b0 = deserialize_uint32_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint32_t ok buf sz pos in
(ok, pos, (U64.shift_left (u32_64 b0) 32ul) + u32_64 b1)
end
private let deserialize_offset_t = deserialize_uint64_t
private let deserialize_index_t = deserialize_uint32_t
private
let deserialize_hash
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 (k, _, h) h1 -> (k ==> Rgl?.r_inv (hreg hash_size) h1 h) /\
loc_disjoint (loc_buffer (CB.cast buf)) (loc_buffer h) /\
modifies B.loc_none h0 h1))
= let rg = hreg hash_size in
if not ok || pos >= sz then (false, pos, rg_dummy rg)
else if sz - pos < hash_size then (false, pos, rg_dummy rg)
else begin
let hash = rg_alloc rg r in
Lib.RawBuffer.blit (CB.cast buf) pos hash 0ul hash_size;
(true, pos + hash_size, hash)
end
private
let rec deserialize_hash_vec_i
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t) (res:hash_vec #hash_size) (i:uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> CB.live h0 buf /\ V.live h0 res))
(ensures (fun h0 _ h1 -> B.modifies (B.loc_buffer (V.Vec?.vs res)) h0 h1))
= if not ok || pos >= sz then (false, pos)
else begin
let ok, pos, h = deserialize_hash ok buf sz r pos in
if not ok then (false, pos)
else begin
V.assign res i h;
(*
* AR: 04/01: The call deserialize_hash_vec_i below needs liveness of buf
* So we have to frame buf liveness for the V.assign call
* V.assign provides a modifies postcondition in terms of
* loc_vector_within, which is a recursive predicate and
* I guess hard to reason about directly
* Whereas to reason about liveness of buf, we only need an
* overapproximation that V.assign modifies V.Vec?.vs res
* Looking at the Vector library, I found the following lemma
* that does the trick
*)
V.loc_vector_within_included res i (i + 1ul);
let j = i + 1ul in
if j < V.size_of res then deserialize_hash_vec_i ok buf sz r pos res j
else (true, pos)
end
end
private
let deserialize_hash_vec
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash_vec #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> B.modifies B.loc_none h0 h1))
= let rg = hvreg hash_size in
if not ok || pos >= sz then (false, pos, rg_dummy rg)
else begin
let ok, pos, n = deserialize_uint32_t ok buf sz pos in
if not ok then (false, pos, V.alloc_empty hash)
else if n = 0ul then (true, pos, V.alloc_empty hash)
else begin
let hrg = hreg hash_size in
let res = V.alloc n (rg_dummy hrg) in
let ok, pos = deserialize_hash_vec_i ok buf sz r pos res 0ul in
(ok, pos, res)
end
end
private
let rec deserialize_hash_vv_i
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t) (res:hash_vv hash_size) (i:uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> CB.live h0 buf /\ V.live h0 res /\
B.loc_disjoint (CB.loc_buffer buf) (V.loc_vector res)))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer (V.Vec?.vs res)) h0 h1))
=
if not ok || pos >= sz then (false, 0ul)
else begin
let ok, pos, hv = deserialize_hash_vec ok buf sz r pos in
let h0 = HST.get() in
if not ok then (false, pos)
else begin
V.assign res i hv;
(*
* AR: 04/01: The call deserialize_hash_vv_i below needs liveness of buf
* So we have to frame buf liveness for the V.assign call
* V.assign provides a modifies postcondition in terms of
* loc_vector_within, which is a recursive predicate and
* I guess hard to reason about directly
* Whereas to reason about liveness of buf, we only need an
* overapproximation that V.assign modifies V.Vec?.vs res
* Looking at the Vector library, I found the following lemma
* that does the trick
*)
V.loc_vector_within_included res i (i + 1ul);
let j = i + 1ul in
if j = V.size_of res then (true, pos)
else deserialize_hash_vv_i ok buf sz r pos res j
end
end
private let deserialize_hash_vv
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash_vv hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> modifies B.loc_none h0 h1))
= if not ok || pos >= sz then (false, pos, V.alloc_empty hash_vec)
else begin
let ok, pos, n = deserialize_uint32_t ok buf sz pos in
if not ok then (false, pos, V.alloc_empty hash_vec)
else if n = 0ul then (true, pos, V.alloc_empty hash_vec)
else begin
let rg = hvreg hash_size in
let res = V.alloc n (rg_dummy rg) in
let ok, pos = deserialize_hash_vv_i ok buf sz r pos res 0ul in
(ok, pos, res)
end
end
#push-options "--z3rlimit 10"
val mt_serialize_size: mt:const_mt_p -> HST.ST uint64_t
(requires (fun h0 -> mt_safe h0 (CB.cast mt))) | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Regional.Instances.fst.checked",
"LowStar.Regional.fst.checked",
"LowStar.Modifies.fst.checked",
"LowStar.ConstBuffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.RawBuffer.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt16.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Monotonic.HyperHeap.fsti.checked",
"FStar.Integers.fst.checked",
"FStar.Int.Cast.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "MerkleTree.Low.Serialization.fst"
} | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt8",
"short_module": "U8"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.UInt16",
"short_module": "U16"
},
{
"abbrev": true,
"full_module": "LowStar.Regional.Instances",
"short_module": "RVI"
},
{
"abbrev": true,
"full_module": "LowStar.RVector",
"short_module": "RV"
},
{
"abbrev": true,
"full_module": "LowStar.Vector",
"short_module": "V"
},
{
"abbrev": true,
"full_module": "LowStar.ConstBuffer",
"short_module": "CB"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.Monotonic.HyperHeap",
"short_module": "HH"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Regional.Instances",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Regional",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.RVector",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Vector",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Modifies",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 10,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | mt: MerkleTree.Low.const_mt_p -> FStar.HyperStack.ST.ST MerkleTree.Low.Serialization.uint64_t | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.const_mt_p",
"FStar.Integers.op_Less",
"FStar.Integers.Unsigned",
"FStar.Integers.W64",
"MerkleTree.Low.uint32_max",
"FStar.Integers.op_Plus",
"FStar.UInt64.__uint_to_t",
"MerkleTree.Low.Serialization.hash_vec_bytes",
"MerkleTree.Low.__proj__MT__item__hash_size",
"MerkleTree.Low.u32_64",
"Prims.bool",
"MerkleTree.Low.uint64_max",
"MerkleTree.Low.Serialization.uint64_t",
"MerkleTree.Low.Serialization.hash_vv_bytes",
"MerkleTree.Low.Datastructures.hash_vec",
"Prims.b2t",
"Prims.op_Equality",
"LowStar.Vector.uint32_t",
"LowStar.Vector.size_of",
"MerkleTree.Low.Datastructures.hash",
"MerkleTree.Low.merkle_tree_size_lg",
"MerkleTree.Low.__proj__MT__item__rhs",
"MerkleTree.Low.__proj__MT__item__rhs_ok",
"MerkleTree.Low.Datastructures.hash_vv",
"MerkleTree.Low.__proj__MT__item__hs",
"MerkleTree.Low.merkle_tree",
"LowStar.BufferOps.op_Bang_Star",
"LowStar.ConstBuffer.qbuf_pre",
"LowStar.ConstBuffer.as_qbuf",
"LowStar.ConstBuffer.cast"
] | [] | false | true | false | false | false | let mt_serialize_size mt =
| let mtv = !*(CB.cast mt) in
let hs = MT?.hs mtv in
let rhs_ok = MT?.rhs_ok mtv in
let rhs = MT?.rhs mtv in
let hs_sz = hash_vv_bytes hs in
if hs_sz < uint32_max
then 1uL + 4uL + 8uL + 4uL + 4uL + hs_sz + 1uL + hash_vec_bytes rhs + u32_64 (MT?.hash_size mtv)
else uint64_max | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_wpProof_Check_avx2_support | val va_wpProof_Check_avx2_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_avx2_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_avx2_support ()) ([va_Mod_flags;
va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax])
va_s0 va_k ((va_sM, va_f0, va_g)))) | val va_wpProof_Check_avx2_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_avx2_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_avx2_support ()) ([va_Mod_flags;
va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax])
va_s0 va_k ((va_sM, va_f0, va_g)))) | let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 489,
"start_col": 0,
"start_line": 480
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_state",
"Prims.unit",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Prims.Nil",
"Prims._assert",
"Vale.X64.Decls.va_state_eq",
"Vale.X64.Decls.va_update_flags",
"Vale.X64.Decls.va_update_reg64",
"Vale.X64.Decls.va_update_ok",
"Vale.X64.Decls.va_lemma_upd_update",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.X64.State.vale_state",
"Vale.Lib.X64.Cpuid.va_lemma_Check_avx2_support",
"Vale.Lib.X64.Cpuid.va_code_Check_avx2_support"
] | [] | false | false | false | false | false | let va_wpProof_Check_avx2_support va_s0 va_k =
| let va_sM, va_f0 = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
(va_update_flags va_sM
(va_update_reg64 rR9
va_sM
(va_update_reg64 rRdx
va_sM
(va_update_reg64 rRcx
va_sM
(va_update_reg64 rRbx
va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax
])
va_sM
va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_wpProof_Check_avx_support | val va_wpProof_Check_avx_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_avx_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_avx_support ()) ([va_Mod_flags;
va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax])
va_s0 va_k ((va_sM, va_f0, va_g)))) | val va_wpProof_Check_avx_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_avx_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_avx_support ()) ([va_Mod_flags;
va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax])
va_s0 va_k ((va_sM, va_f0, va_g)))) | let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 410,
"start_col": 0,
"start_line": 401
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_state",
"Prims.unit",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Prims.Nil",
"Prims._assert",
"Vale.X64.Decls.va_state_eq",
"Vale.X64.Decls.va_update_flags",
"Vale.X64.Decls.va_update_reg64",
"Vale.X64.Decls.va_update_ok",
"Vale.X64.Decls.va_lemma_upd_update",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.X64.State.vale_state",
"Vale.Lib.X64.Cpuid.va_lemma_Check_avx_support",
"Vale.Lib.X64.Cpuid.va_code_Check_avx_support"
] | [] | false | false | false | false | false | let va_wpProof_Check_avx_support va_s0 va_k =
| let va_sM, va_f0 = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
(va_update_flags va_sM
(va_update_reg64 rR9
va_sM
(va_update_reg64 rRdx
va_sM
(va_update_reg64 rRcx
va_sM
(va_update_reg64 rRbx
va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax
])
va_sM
va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_lemma_Check_avx_support | val va_lemma_Check_avx_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_avx_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ va_get_reg64 rRbx va_sM ==
va_get_reg64 rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | val va_lemma_Check_avx_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_avx_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ va_get_reg64 rRbx va_sM ==
va_get_reg64 rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 397,
"start_col": 0,
"start_line": 382
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state
-> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.fuel",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Vale.X64.Decls.va_fuel",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.QuickCode.va_Mod_ok",
"Prims.Nil",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.list",
"Vale.X64.QuickCode.__proj__QProc__item__mods",
"Vale.Lib.X64.Cpuid.va_code_Check_avx_support",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.tuple3",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCodes.va_wp_sound_code_norm",
"Prims.l_and",
"Vale.X64.QuickCodes.label",
"Vale.X64.QuickCodes.va_range1",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Prims.l_imp",
"Prims.l_not",
"Prims.int",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.CPU_Features_s.avx_cpuid_enabled",
"Vale.Def.Types_s.nat64",
"Vale.X64.QuickCode.quickCode",
"Vale.Lib.X64.Cpuid.va_qcode_Check_avx_support"
] | [] | false | false | false | false | false | let va_lemma_Check_avx_support va_b0 va_s0 =
| let va_mods:va_mods_t =
[
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
]
in
let va_qc = va_qcode_Check_avx_support va_mods in
let va_sM, va_fM, va_g =
va_wp_sound_code_norm (va_code_Check_avx_support ())
va_qc
va_s0
(fun va_s0 va_sM va_g ->
let () = va_g in
label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0))
in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
])
va_sM
va_s0;
(va_sM, va_fM) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_code_Check_osxsave_support | val va_code_Check_osxsave_support : va_dummy:unit -> Tot va_code | val va_code_Check_osxsave_support : va_dummy:unit -> Tot va_code | let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
())))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 1008,
"start_col": 0,
"start_line": 1000
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_code | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_Block",
"Vale.X64.Decls.va_CCons",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_code_Cpuid_Osxsave",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_CNil",
"Vale.X64.Decls.va_code"
] | [] | false | false | false | true | false | let va_code_Check_osxsave_support () =
| (va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_CCons (va_code_Cpuid_Osxsave ())
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 134217728))
(va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx)
(va_op_opr64_reg64 rR9))
(va_CNil ())))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_codegen_success_Check_osxsave_support | val va_codegen_success_Check_osxsave_support : va_dummy:unit -> Tot va_pbool | val va_codegen_success_Check_osxsave_support : va_dummy:unit -> Tot va_pbool | let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 15,
"end_line": 1020,
"start_col": 0,
"start_line": 1011
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
())))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_pbool_and",
"Vale.X64.InsBasic.va_codegen_success_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_codegen_success_Cpuid_Osxsave",
"Vale.X64.InsBasic.va_codegen_success_And64",
"Vale.X64.InsBasic.va_codegen_success_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_ttrue",
"Vale.X64.Decls.va_pbool"
] | [] | false | false | false | true | false | let va_codegen_success_Check_osxsave_support () =
| (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ())
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 134217728))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 26))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx)
(va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_qcode_Check_avx_support | val va_qcode_Check_avx_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx_support ())) | val va_qcode_Check_avx_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx_support ())) | let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 379,
"start_col": 0,
"start_line": 347
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_mods: Vale.X64.QuickCode.va_mods_t
-> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.Lib.X64.Cpuid.va_code_Check_avx_support ()) | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.QuickCode.va_mods_t",
"Vale.X64.QuickCodes.qblock",
"Prims.unit",
"Prims.Cons",
"Vale.X64.Decls.va_code",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_code_Cpuid_Avx",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Prims.Nil",
"Vale.X64.Machine_s.precode",
"Vale.X64.Decls.ins",
"Vale.X64.Decls.ocmp",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.va_QSeq",
"Vale.X64.QuickCodes.va_range1",
"Vale.X64.InsBasic.va_quick_Mov64",
"Vale.X64.QuickCodes.va_QBind",
"Vale.X64.InsBasic.va_quick_Cpuid_Avx",
"Vale.X64.QuickCodes.va_qPURE",
"Prims.pure_post",
"Prims.l_and",
"Prims.l_True",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Vale.Def.Types_s.iand",
"Prims.op_GreaterThan",
"Prims.op_GreaterThanOrEqual",
"Vale.Arch.TypesNative.lemma_iand_pow2_64",
"Vale.X64.InsBasic.va_quick_And64",
"Vale.X64.QuickCodes.va_QLemma",
"FStar.Pervasives.normalize",
"Prims.squash",
"Vale.Lib.Basic.assert_normalize",
"Vale.X64.InsBasic.va_quick_Shr64",
"Prims.op_LessThanOrEqual",
"Vale.Def.Types_s.ishr",
"Prims.op_Subtraction",
"Vale.Arch.TypesNative.lemma_ishr_pow2_diff64",
"Vale.Arch.TypesNative.lemma_ishr_zero64",
"Vale.X64.QuickCodes.va_QEmpty",
"Vale.X64.QuickCodes.quickCodes",
"Vale.Def.Words_s.nat64",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCode.va_quickCode",
"Vale.Lib.X64.Cpuid.va_code_Check_avx_support"
] | [] | false | false | false | false | false | let va_qcode_Check_avx_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx_support ())) =
| (qblock va_mods
(fun (va_s: va_state) ->
let va_old_s:va_state = va_s in
va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ())
(fun (va_s: va_state) _ ->
let va_arg14:Vale.Def.Types_s.nat64 = va_get_reg64 rRcx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 268435456))
(fun (va_s: va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (268435456 ==
Prims.pow2 28))
(fun _ ->
(fun (p: prop) -> p) (268435456 == Prims.pow2 28))
(fun (_: unit) ->
assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 27))
(fun (va_s: va_state) _ ->
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
1
28)
(va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_zero64 27
)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx
)
(va_op_opr64_reg64 rR9))
(va_QEmpty (()))))))))))))))) | false |
Pulse.Checker.Prover.ElimPure.fst | Pulse.Checker.Prover.ElimPure.elim_pure_frame | val elim_pure_frame
(#g: env)
(#ctxt #frame: term)
(ctxt_frame_typing: tot_typing g (ctxt * frame) tm_vprop)
(uvs: env{disjoint uvs g})
: T.Tac
(g': env{env_extends g' g /\ disjoint uvs g'} &
ctxt': term &
tot_typing g' (ctxt' * frame) tm_vprop &
continuation_elaborator g (ctxt * frame) g' (ctxt' * frame)) | val elim_pure_frame
(#g: env)
(#ctxt #frame: term)
(ctxt_frame_typing: tot_typing g (ctxt * frame) tm_vprop)
(uvs: env{disjoint uvs g})
: T.Tac
(g': env{env_extends g' g /\ disjoint uvs g'} &
ctxt': term &
tot_typing g' (ctxt' * frame) tm_vprop &
continuation_elaborator g (ctxt * frame) g' (ctxt' * frame)) | let elim_pure_frame (#g:env) (#ctxt:term) (#frame:term)
(ctxt_frame_typing:tot_typing g (ctxt * frame) tm_vprop)
(uvs:env { disjoint uvs g })
: T.Tac (g':env { env_extends g' g /\ disjoint uvs g' } &
ctxt':term &
tot_typing g' (ctxt' * frame) tm_vprop &
continuation_elaborator g (ctxt * frame) g' (ctxt' * frame)) =
add_elims is_elim_pure mk ctxt_frame_typing uvs | {
"file_name": "lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 49,
"end_line": 114,
"start_col": 0,
"start_line": 107
} | (*
Copyright 2023 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module Pulse.Checker.Prover.ElimPure
module RT = FStar.Reflection.Typing
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module T = FStar.Tactics.V2
open FStar.List.Tot
open Pulse.Syntax
open Pulse.Checker.Pure
open Pulse.Checker.VPropEquiv
open Pulse.Typing
open Pulse.Typing.Combinators
module Metatheory = Pulse.Typing.Metatheory
open Pulse.Reflection.Util
open Pulse.Checker.Prover.Base
module RU = Pulse.RuntimeUtils
let elim_pure_head =
let elim_pure_explicit_lid = mk_pulse_lib_core_lid "elim_pure_explicit" in
tm_fvar (as_fv elim_pure_explicit_lid)
let elim_pure_head_ty =
// let open Pulse.Steel.Wrapper in
// let open Steel.Effect.Common in
let squash_p = mk_squash u0 (RT.bound_var 0) in
let pure_p = mk_pure (RT.bound_var 0) in
let post =
mk_abs squash_p R.Q_Explicit (R.pack_ln (R.Tv_FVar (R.pack_fv emp_lid)))
in
let cod = mk_stt_ghost_comp u0 squash_p pure_p post in
mk_arrow
(R.pack_ln (R.Tv_FVar (R.pack_fv R.prop_qn)), R.Q_Explicit)
cod
// Following crashes in extraction
// `(p:prop -> stt_ghost (squash p) emp_inames
// (pure p)
// (fun _ -> emp))
let tm_fstar t = tm_fstar t Range.range_0
let elim_pure_head_typing (g:env)
: tot_typing g elim_pure_head (tm_fstar elim_pure_head_ty)
= admit()
let mk_elim_pure (p:term)
: st_term
= let t = Tm_STApp { head = elim_pure_head;
arg_qual = None;
arg = p }
in
wtag (Some STT_Ghost) t
let elim_pure_comp (p:host_term) =
let st : st_comp = {
u=u_zero;
res=tm_fstar (mk_squash u0 p);
pre=tm_pure (tm_fstar p);
post=tm_emp
} in
C_STGhost st
#push-options "--admit_smt_queries true"
let elim_pure_typing (g:env) (p:host_term)
(p_prop:tot_typing g (tm_fstar p) (tm_fstar RT.tm_prop))
: st_typing g (mk_elim_pure (tm_fstar p)) (elim_pure_comp p)
= T_STApp g elim_pure_head (tm_fstar RT.tm_prop) None (elim_pure_comp p) _ (elim_pure_head_typing g) p_prop
#pop-options
let is_elim_pure (vp:term) : T.Tac bool =
match vp.t with
| Tm_Pure {t=Tm_FStar _} -> true
| _ -> false
let mk (#g:env) (#v:vprop) (v_typing:tot_typing g v tm_vprop)
: T.Tac (option (x:ppname &
t:st_term &
c:comp { stateful_comp c /\ comp_pre c == v } &
st_typing g t c)) =
match v.t with
| Tm_Pure {t=Tm_FStar pp} ->
let p_typing =
Metatheory.pure_typing_inversion #g #(tm_fstar pp) v_typing in
Some (| ppname_default,
mk_elim_pure (tm_fstar pp),
elim_pure_comp pp,
elim_pure_typing g pp p_typing |)
| _ -> None | {
"checked_file": "/",
"dependencies": [
"Pulse.Typing.Metatheory.fsti.checked",
"Pulse.Typing.Combinators.fsti.checked",
"Pulse.Typing.fst.checked",
"Pulse.Syntax.fst.checked",
"Pulse.RuntimeUtils.fsti.checked",
"Pulse.Reflection.Util.fst.checked",
"Pulse.Checker.VPropEquiv.fsti.checked",
"Pulse.Checker.Pure.fsti.checked",
"Pulse.Checker.Prover.Base.fsti.checked",
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked"
],
"interface_file": true,
"source_file": "Pulse.Checker.Prover.ElimPure.fst"
} | [
{
"abbrev": true,
"full_module": "Pulse.RuntimeUtils",
"short_module": "RU"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Reflection.Util",
"short_module": null
},
{
"abbrev": true,
"full_module": "Pulse.Typing.Metatheory",
"short_module": "Metatheory"
},
{
"abbrev": false,
"full_module": "Pulse.Typing.Combinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Typing",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.VPropEquiv",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Syntax",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Typing",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Syntax",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
ctxt_frame_typing: Pulse.Typing.tot_typing g (ctxt * frame) Pulse.Syntax.Base.tm_vprop ->
uvs: Pulse.Typing.Env.env{Pulse.Typing.Env.disjoint uvs g}
-> FStar.Tactics.Effect.Tac
(FStar.Pervasives.dtuple4 (g':
Pulse.Typing.Env.env
{Pulse.Typing.Env.env_extends g' g /\ Pulse.Typing.Env.disjoint uvs g'})
(fun _ -> Pulse.Syntax.Base.term)
(fun g' ctxt' -> Pulse.Typing.tot_typing g' (ctxt' * frame) Pulse.Syntax.Base.tm_vprop)
(fun g' ctxt' _ ->
Pulse.Checker.Base.continuation_elaborator g (ctxt * frame) g' (ctxt' * frame))) | FStar.Tactics.Effect.Tac | [] | [] | [
"Pulse.Typing.Env.env",
"Pulse.Syntax.Base.term",
"Pulse.Typing.tot_typing",
"Pulse.Checker.Prover.Base.op_Star",
"Pulse.Syntax.Base.tm_vprop",
"Pulse.Typing.Env.disjoint",
"Pulse.Checker.Prover.Base.add_elims",
"Pulse.Checker.Prover.ElimPure.is_elim_pure",
"Pulse.Checker.Prover.ElimPure.mk",
"FStar.Pervasives.dtuple4",
"Prims.l_and",
"Pulse.Typing.Env.env_extends",
"Pulse.Syntax.Base.tm_star",
"Pulse.Checker.Base.continuation_elaborator"
] | [] | false | true | false | false | false | let elim_pure_frame
(#g: env)
(#ctxt #frame: term)
(ctxt_frame_typing: tot_typing g (ctxt * frame) tm_vprop)
(uvs: env{disjoint uvs g})
: T.Tac
(g': env{env_extends g' g /\ disjoint uvs g'} &
ctxt': term &
tot_typing g' (ctxt' * frame) tm_vprop &
continuation_elaborator g (ctxt * frame) g' (ctxt' * frame)) =
| add_elims is_elim_pure mk ctxt_frame_typing uvs | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_qcode_Check_avx2_support | val va_qcode_Check_avx2_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx2_support ())) | val va_qcode_Check_avx2_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx2_support ())) | let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (())))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 100,
"end_line": 458,
"start_col": 0,
"start_line": 435
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_mods: Vale.X64.QuickCode.va_mods_t
-> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.Lib.X64.Cpuid.va_code_Check_avx2_support ()) | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.QuickCode.va_mods_t",
"Vale.X64.QuickCodes.qblock",
"Prims.unit",
"Prims.Cons",
"Vale.X64.Decls.va_code",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.InsBasic.va_code_Cpuid_Avx2",
"Vale.X64.InsBasic.va_code_And64",
"Prims.Nil",
"Vale.X64.Machine_s.precode",
"Vale.X64.Decls.ins",
"Vale.X64.Decls.ocmp",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.va_QSeq",
"Vale.X64.QuickCodes.va_range1",
"Vale.X64.InsBasic.va_quick_Mov64",
"Vale.X64.QuickCodes.va_QBind",
"Vale.X64.InsBasic.va_quick_Cpuid_Avx2",
"Vale.X64.QuickCodes.va_qPURE",
"Prims.pure_post",
"Prims.l_and",
"Prims.l_True",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Vale.Def.Types_s.iand",
"Prims.op_GreaterThan",
"Prims.op_GreaterThanOrEqual",
"Vale.Arch.TypesNative.lemma_iand_pow2_64",
"Vale.X64.InsBasic.va_quick_And64",
"Vale.X64.QuickCodes.va_QLemma",
"FStar.Pervasives.normalize",
"Prims.squash",
"Vale.Lib.Basic.assert_normalize",
"Vale.X64.QuickCodes.va_QEmpty",
"Vale.X64.QuickCodes.quickCodes",
"Vale.Def.Words_s.nat64",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCode.va_quickCode",
"Vale.Lib.X64.Cpuid.va_code_Check_avx2_support"
] | [] | false | false | false | false | false | let va_qcode_Check_avx2_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx2_support ())) =
| (qblock va_mods
(fun (va_s: va_state) ->
let va_old_s:va_state = va_s in
va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ())
(fun (va_s: va_state) _ ->
let va_arg11:Vale.Def.Types_s.nat64 = va_get_reg64 rRbx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5)
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32))
(fun (va_s: va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (32 == Prims.pow2 5))
(fun _ -> (fun (p: prop) -> p) (32 == Prims.pow2 5))
(fun (_: unit) -> assert_normalize (32 == Prims.pow2 5))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx)
(va_op_opr64_reg64 rR9))
(va_QEmpty (())))))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_codegen_success_Check_avx_xcr0_support | val va_codegen_success_Check_avx_xcr0_support : va_dummy:unit -> Tot va_pbool | val va_codegen_success_Check_avx_xcr0_support : va_dummy:unit -> Tot va_pbool | let va_codegen_success_Check_avx_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ())))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 79,
"end_line": 1108,
"start_col": 0,
"start_line": 1101
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_osxsave_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_osxsave_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_osxsave_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_osxsave_support (va_code_Check_osxsave_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
4)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ()))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_pbool_and",
"Vale.X64.InsBasic.va_codegen_success_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.InsBasic.va_codegen_success_Xgetbv_Avx",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_codegen_success_And64",
"Vale.X64.InsBasic.va_codegen_success_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_ttrue",
"Vale.X64.Decls.va_pbool"
] | [] | false | false | false | true | false | let va_codegen_success_Check_avx_xcr0_support () =
| (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx ())
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 1))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRcx)
(va_const_opr64 2))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_ttrue ())))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_qcode_Check_adx_bmi2_support | val va_qcode_Check_adx_bmi2_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_adx_bmi2_support ())) | val va_qcode_Check_adx_bmi2_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_adx_bmi2_support ())) | let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 288,
"start_col": 0,
"start_line": 241
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_mods: Vale.X64.QuickCode.va_mods_t
-> Vale.X64.QuickCode.va_quickCode Prims.unit
(Vale.Lib.X64.Cpuid.va_code_Check_adx_bmi2_support ()) | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.QuickCode.va_mods_t",
"Vale.X64.QuickCodes.qblock",
"Prims.unit",
"Prims.Cons",
"Vale.X64.Decls.va_code",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.InsBasic.va_code_Cpuid_Adx_Bmi2",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Prims.Nil",
"Vale.X64.Machine_s.precode",
"Vale.X64.Decls.ins",
"Vale.X64.Decls.ocmp",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.va_QSeq",
"Vale.X64.QuickCodes.va_range1",
"Vale.X64.InsBasic.va_quick_Mov64",
"Vale.X64.QuickCodes.va_QBind",
"Vale.X64.InsBasic.va_quick_Cpuid_Adx_Bmi2",
"Vale.X64.QuickCodes.va_qPURE",
"Prims.pure_post",
"Prims.l_and",
"Prims.l_True",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Vale.Def.Types_s.iand",
"Prims.op_GreaterThan",
"Prims.op_GreaterThanOrEqual",
"Vale.Arch.TypesNative.lemma_iand_pow2_64",
"Vale.X64.InsBasic.va_quick_And64",
"Vale.X64.QuickCodes.va_QLemma",
"FStar.Pervasives.normalize",
"Prims.squash",
"Vale.Lib.Basic.assert_normalize",
"Vale.X64.InsBasic.va_quick_Shr64",
"Prims.op_LessThanOrEqual",
"Vale.Def.Types_s.ishr",
"Prims.op_Subtraction",
"Vale.Arch.TypesNative.lemma_ishr_pow2_diff64",
"Vale.Arch.TypesNative.lemma_ishr_zero64",
"Prims.l_iff",
"Prims.op_Negation",
"Prims.op_Equality",
"Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64",
"Vale.X64.QuickCodes.va_QEmpty",
"Vale.Def.Words_s.nat64",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.QuickCodes.quickCodes",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCode.va_quickCode",
"Vale.Lib.X64.Cpuid.va_code_Check_adx_bmi2_support"
] | [] | false | false | false | false | false | let va_qcode_Check_adx_bmi2_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_adx_bmi2_support ())) =
| (qblock va_mods
(fun (va_s: va_state) ->
let va_old_s:va_state = va_s in
va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ())
(fun (va_s: va_state) _ ->
let va_arg22:Vale.Def.Types_s.nat64 = va_get_reg64 rRbx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8)
(let va_arg21:Vale.Def.Types_s.nat64 = va_get_reg64 rRbx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 524288))
(fun (va_s: va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (256 == Prims.pow2 8))
(fun _ -> (fun (p: prop) -> p) (256 == Prims.pow2 8))
(fun (_: unit) ->
assert_normalize (256 == Prims.pow2 8))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (524288 ==
Prims.pow2 19))
(fun _ ->
(fun (p: prop) -> p) (524288 == Prims.pow2 19)
)
(fun (_: unit) ->
assert_normalize (524288 == Prims.pow2 19))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 11))
(fun (va_s: va_state) _ ->
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
8
19)
(va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_zero64
11)
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64
rRbx)
(va_const_opr64 256))
(fun (va_s: va_state) _ ->
let va_arg20:Vale.Def.Types_s.nat64
=
va_get_reg64 rRbx va_s
in
let va_arg19:Vale.Def.Types_s.nat64
=
va_get_reg64 rRax va_s
in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64
va_arg19
va_arg20
8)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64
rRax)
(va_op_opr64_reg64
rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64
rRbx)
(va_op_opr64_reg64
rR9))
(va_QEmpty (()))))
)))))))))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_lemma_Check_avx2_support | val va_lemma_Check_avx2_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_avx2_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ va_get_reg64 rRbx va_sM ==
va_get_reg64 rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | val va_lemma_Check_avx2_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_avx2_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ va_get_reg64 rRbx va_sM ==
va_get_reg64 rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 476,
"start_col": 0,
"start_line": 461
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (())))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state
-> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.fuel",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Vale.X64.Decls.va_fuel",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.QuickCode.va_Mod_ok",
"Prims.Nil",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.list",
"Vale.X64.QuickCode.__proj__QProc__item__mods",
"Vale.Lib.X64.Cpuid.va_code_Check_avx2_support",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.tuple3",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCodes.va_wp_sound_code_norm",
"Prims.l_and",
"Vale.X64.QuickCodes.label",
"Vale.X64.QuickCodes.va_range1",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Prims.l_imp",
"Prims.l_not",
"Prims.int",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.CPU_Features_s.avx2_cpuid_enabled",
"Vale.Def.Types_s.nat64",
"Vale.X64.QuickCode.quickCode",
"Vale.Lib.X64.Cpuid.va_qcode_Check_avx2_support"
] | [] | false | false | false | false | false | let va_lemma_Check_avx2_support va_b0 va_s0 =
| let va_mods:va_mods_t =
[
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
]
in
let va_qc = va_qcode_Check_avx2_support va_mods in
let va_sM, va_fM, va_g =
va_wp_sound_code_norm (va_code_Check_avx2_support ())
va_qc
va_s0
(fun va_s0 va_sM va_g ->
let () = va_g in
label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0))
in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
])
va_sM
va_s0;
(va_sM, va_fM) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_code_Check_avx_xcr0_support | val va_code_Check_avx_xcr0_support : va_dummy:unit -> Tot va_code | val va_code_Check_avx_xcr0_support : va_dummy:unit -> Tot va_code | let va_code_Check_avx_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
4)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ()))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 79,
"end_line": 1098,
"start_col": 0,
"start_line": 1092
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_osxsave_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_osxsave_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_osxsave_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_osxsave_support (va_code_Check_osxsave_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_xcr0_support | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_code | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_Block",
"Vale.X64.Decls.va_CCons",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.InsBasic.va_code_Xgetbv_Avx",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_CNil",
"Vale.X64.Decls.va_code"
] | [] | false | false | false | true | false | let va_code_Check_avx_xcr0_support () =
| (va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_CCons (va_code_Xgetbv_Avx ())
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4))
(va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_CNil ()))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_codegen_success_Check_avx512_xcr0_support | val va_codegen_success_Check_avx512_xcr0_support : va_dummy:unit -> Tot va_pbool | val va_codegen_success_Check_avx512_xcr0_support : va_dummy:unit -> Tot va_pbool | let va_codegen_success_Check_avx512_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 128)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 2)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRcx) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ())))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 83,
"end_line": 1209,
"start_col": 0,
"start_line": 1198
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_osxsave_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_osxsave_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_osxsave_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_osxsave_support (va_code_Check_osxsave_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
4)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_xcr0_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx_xcr0_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 358 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 359 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx ()) (fun (va_s:va_state) _ -> let (va_arg19:Vale.Def.Types_s.nat64) =
va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 360 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg19 1) (let
(va_arg18:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 361 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg18 2) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 362 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 364 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 366 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 367 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4 == Prims.pow2 2)) (fun _ -> (fun (p:prop) -> p) (4 ==
Prims.pow2 2)) (fun (_:unit) -> assert_normalize (4 == Prims.pow2 2)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 369 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 370 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 2) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 371 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 373 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg17:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg16:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 374 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg16 va_arg17 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 375 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QEmpty
(())))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_xcr0_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok] in
let va_qc = va_qcode_Check_avx_xcr0_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_xcr0_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 349 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 356 column 30 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_xcr0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_xcr0_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_xcr0_support (va_code_Check_avx_xcr0_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rRdx va_sM (va_update_reg64
rRcx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax])
va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx512 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
32)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 128)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 2)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRcx) (va_const_shift_amt64 1)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ()))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_pbool_and",
"Vale.X64.InsBasic.va_codegen_success_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.InsBasic.va_codegen_success_Xgetbv_Avx512",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.InsBasic.va_codegen_success_And64",
"Vale.X64.InsBasic.va_codegen_success_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_ttrue",
"Vale.X64.Decls.va_pbool"
] | [] | false | false | false | true | false | let va_codegen_success_Check_avx512_xcr0_support () =
| (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx512 ())
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRdx)
(va_op_opr64_reg64 rRax))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 32))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRcx)
(va_const_opr64 64))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRdx)
(va_const_opr64 128))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRdx)
(va_const_shift_amt64 2))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRcx)
(va_const_shift_amt64 1))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax
)
(va_op_opr64_reg64 rRdx))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64
rRax)
(va_op_opr64_reg64 rRcx))
(va_ttrue ())))))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_qcode_Check_movbe_support | val va_qcode_Check_movbe_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_movbe_support ())) | val va_qcode_Check_movbe_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_movbe_support ())) | let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 548,
"start_col": 0,
"start_line": 516
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_mods: Vale.X64.QuickCode.va_mods_t
-> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.Lib.X64.Cpuid.va_code_Check_movbe_support ()) | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.QuickCode.va_mods_t",
"Vale.X64.QuickCodes.qblock",
"Prims.unit",
"Prims.Cons",
"Vale.X64.Decls.va_code",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_code_Cpuid_Movbe",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Prims.Nil",
"Vale.X64.Machine_s.precode",
"Vale.X64.Decls.ins",
"Vale.X64.Decls.ocmp",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.va_QSeq",
"Vale.X64.QuickCodes.va_range1",
"Vale.X64.InsBasic.va_quick_Mov64",
"Vale.X64.QuickCodes.va_QBind",
"Vale.X64.InsBasic.va_quick_Cpuid_Movbe",
"Vale.X64.QuickCodes.va_qPURE",
"Prims.pure_post",
"Prims.l_and",
"Prims.l_True",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Vale.Def.Types_s.iand",
"Prims.op_GreaterThan",
"Prims.op_GreaterThanOrEqual",
"Vale.Arch.TypesNative.lemma_iand_pow2_64",
"Vale.X64.InsBasic.va_quick_And64",
"Vale.X64.QuickCodes.va_QLemma",
"FStar.Pervasives.normalize",
"Prims.squash",
"Vale.Lib.Basic.assert_normalize",
"Vale.X64.InsBasic.va_quick_Shr64",
"Prims.op_LessThanOrEqual",
"Vale.Def.Types_s.ishr",
"Prims.op_Subtraction",
"Vale.Arch.TypesNative.lemma_ishr_pow2_diff64",
"Vale.Arch.TypesNative.lemma_ishr_zero64",
"Vale.X64.QuickCodes.va_QEmpty",
"Vale.X64.QuickCodes.quickCodes",
"Vale.Def.Words_s.nat64",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCode.va_quickCode",
"Vale.Lib.X64.Cpuid.va_code_Check_movbe_support"
] | [] | false | false | false | false | false | let va_qcode_Check_movbe_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_movbe_support ())) =
| (qblock va_mods
(fun (va_s: va_state) ->
let va_old_s:va_state = va_s in
va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ())
(fun (va_s: va_state) _ ->
let va_arg14:Vale.Def.Types_s.nat64 = va_get_reg64 rRcx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 4194304))
(fun (va_s: va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (4194304 == Prims.pow2 22)
)
(fun _ -> (fun (p: prop) -> p) (4194304 == Prims.pow2 22))
(fun (_: unit) ->
assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 21))
(fun (va_s: va_state) _ ->
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
1
22)
(va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_zero64 21
)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx
)
(va_op_opr64_reg64 rR9))
(va_QEmpty (()))))))))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_wpProof_Check_sse_support | val va_wpProof_Check_sse_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_sse_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_sse_support ()) ([va_Mod_flags;
va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax])
va_s0 va_k ((va_sM, va_f0, va_g)))) | val va_wpProof_Check_sse_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_sse_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_sse_support ()) ([va_Mod_flags;
va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax])
va_s0 va_k ((va_sM, va_f0, va_g)))) | let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 719,
"start_col": 0,
"start_line": 710
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_state",
"Prims.unit",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Prims.Nil",
"Prims._assert",
"Vale.X64.Decls.va_state_eq",
"Vale.X64.Decls.va_update_flags",
"Vale.X64.Decls.va_update_reg64",
"Vale.X64.Decls.va_update_ok",
"Vale.X64.Decls.va_lemma_upd_update",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.X64.State.vale_state",
"Vale.Lib.X64.Cpuid.va_lemma_Check_sse_support",
"Vale.Lib.X64.Cpuid.va_code_Check_sse_support"
] | [] | false | false | false | false | false | let va_wpProof_Check_sse_support va_s0 va_k =
| let va_sM, va_f0 = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
(va_update_flags va_sM
(va_update_reg64 rR9
va_sM
(va_update_reg64 rRdx
va_sM
(va_update_reg64 rRcx
va_sM
(va_update_reg64 rRbx
va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax
])
va_sM
va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | false |
Pulse.Checker.Prover.ElimPure.fst | Pulse.Checker.Prover.ElimPure.elim_pure_comp | val elim_pure_comp : p: Pulse.Syntax.Base.host_term -> Pulse.Syntax.Base.comp | let elim_pure_comp (p:host_term) =
let st : st_comp = {
u=u_zero;
res=tm_fstar (mk_squash u0 p);
pre=tm_pure (tm_fstar p);
post=tm_emp
} in
C_STGhost st | {
"file_name": "lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 16,
"end_line": 78,
"start_col": 0,
"start_line": 71
} | (*
Copyright 2023 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module Pulse.Checker.Prover.ElimPure
module RT = FStar.Reflection.Typing
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module T = FStar.Tactics.V2
open FStar.List.Tot
open Pulse.Syntax
open Pulse.Checker.Pure
open Pulse.Checker.VPropEquiv
open Pulse.Typing
open Pulse.Typing.Combinators
module Metatheory = Pulse.Typing.Metatheory
open Pulse.Reflection.Util
open Pulse.Checker.Prover.Base
module RU = Pulse.RuntimeUtils
let elim_pure_head =
let elim_pure_explicit_lid = mk_pulse_lib_core_lid "elim_pure_explicit" in
tm_fvar (as_fv elim_pure_explicit_lid)
let elim_pure_head_ty =
// let open Pulse.Steel.Wrapper in
// let open Steel.Effect.Common in
let squash_p = mk_squash u0 (RT.bound_var 0) in
let pure_p = mk_pure (RT.bound_var 0) in
let post =
mk_abs squash_p R.Q_Explicit (R.pack_ln (R.Tv_FVar (R.pack_fv emp_lid)))
in
let cod = mk_stt_ghost_comp u0 squash_p pure_p post in
mk_arrow
(R.pack_ln (R.Tv_FVar (R.pack_fv R.prop_qn)), R.Q_Explicit)
cod
// Following crashes in extraction
// `(p:prop -> stt_ghost (squash p) emp_inames
// (pure p)
// (fun _ -> emp))
let tm_fstar t = tm_fstar t Range.range_0
let elim_pure_head_typing (g:env)
: tot_typing g elim_pure_head (tm_fstar elim_pure_head_ty)
= admit()
let mk_elim_pure (p:term)
: st_term
= let t = Tm_STApp { head = elim_pure_head;
arg_qual = None;
arg = p }
in
wtag (Some STT_Ghost) t | {
"checked_file": "/",
"dependencies": [
"Pulse.Typing.Metatheory.fsti.checked",
"Pulse.Typing.Combinators.fsti.checked",
"Pulse.Typing.fst.checked",
"Pulse.Syntax.fst.checked",
"Pulse.RuntimeUtils.fsti.checked",
"Pulse.Reflection.Util.fst.checked",
"Pulse.Checker.VPropEquiv.fsti.checked",
"Pulse.Checker.Pure.fsti.checked",
"Pulse.Checker.Prover.Base.fsti.checked",
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked"
],
"interface_file": true,
"source_file": "Pulse.Checker.Prover.ElimPure.fst"
} | [
{
"abbrev": true,
"full_module": "Pulse.RuntimeUtils",
"short_module": "RU"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Reflection.Util",
"short_module": null
},
{
"abbrev": true,
"full_module": "Pulse.Typing.Metatheory",
"short_module": "Metatheory"
},
{
"abbrev": false,
"full_module": "Pulse.Typing.Combinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Typing",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.VPropEquiv",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Syntax",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Typing",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Syntax",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | p: Pulse.Syntax.Base.host_term -> Pulse.Syntax.Base.comp | Prims.Tot | [
"total"
] | [] | [
"Pulse.Syntax.Base.host_term",
"Pulse.Syntax.Base.C_STGhost",
"Pulse.Syntax.Base.st_comp",
"Pulse.Syntax.Base.Mkst_comp",
"Pulse.Syntax.Pure.u_zero",
"Pulse.Checker.Prover.ElimPure.tm_fstar",
"Pulse.Reflection.Util.mk_squash",
"Pulse.Syntax.Pure.u0",
"Pulse.Syntax.Base.tm_pure",
"Pulse.Syntax.Base.tm_emp",
"Pulse.Syntax.Base.comp"
] | [] | false | false | false | true | false | let elim_pure_comp (p: host_term) =
| let st:st_comp =
{ u = u_zero; res = tm_fstar (mk_squash u0 p); pre = tm_pure (tm_fstar p); post = tm_emp }
in
C_STGhost st | false |
|
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_wpProof_Check_movbe_support | val va_wpProof_Check_movbe_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_movbe_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_movbe_support ())
([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx;
va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) | val va_wpProof_Check_movbe_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_movbe_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_movbe_support ())
([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx;
va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) | let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 579,
"start_col": 0,
"start_line": 570
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_state",
"Prims.unit",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Prims.Nil",
"Prims._assert",
"Vale.X64.Decls.va_state_eq",
"Vale.X64.Decls.va_update_flags",
"Vale.X64.Decls.va_update_reg64",
"Vale.X64.Decls.va_update_ok",
"Vale.X64.Decls.va_lemma_upd_update",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.X64.State.vale_state",
"Vale.Lib.X64.Cpuid.va_lemma_Check_movbe_support",
"Vale.Lib.X64.Cpuid.va_code_Check_movbe_support"
] | [] | false | false | false | false | false | let va_wpProof_Check_movbe_support va_s0 va_k =
| let va_sM, va_f0 = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
(va_update_flags va_sM
(va_update_reg64 rR9
va_sM
(va_update_reg64 rRdx
va_sM
(va_update_reg64 rRcx
va_sM
(va_update_reg64 rRbx
va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax
])
va_sM
va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_code_Check_avx512_xcr0_support | val va_code_Check_avx512_xcr0_support : va_dummy:unit -> Tot va_code | val va_code_Check_avx512_xcr0_support : va_dummy:unit -> Tot va_code | let va_code_Check_avx512_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx512 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
32)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 128)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 2)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRcx) (va_const_shift_amt64 1)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ()))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 83,
"end_line": 1195,
"start_col": 0,
"start_line": 1185
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_osxsave_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_osxsave_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_osxsave_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_osxsave_support (va_code_Check_osxsave_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
4)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_xcr0_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx_xcr0_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 358 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 359 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx ()) (fun (va_s:va_state) _ -> let (va_arg19:Vale.Def.Types_s.nat64) =
va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 360 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg19 1) (let
(va_arg18:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 361 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg18 2) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 362 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 364 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 366 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 367 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4 == Prims.pow2 2)) (fun _ -> (fun (p:prop) -> p) (4 ==
Prims.pow2 2)) (fun (_:unit) -> assert_normalize (4 == Prims.pow2 2)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 369 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 370 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 2) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 371 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 373 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg17:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg16:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 374 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg16 va_arg17 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 375 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QEmpty
(())))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_xcr0_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok] in
let va_qc = va_qcode_Check_avx_xcr0_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_xcr0_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 349 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 356 column 30 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_xcr0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_xcr0_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_xcr0_support (va_code_Check_avx_xcr0_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rRdx va_sM (va_update_reg64
rRcx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax])
va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_xcr0_support | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_dummy: Prims.unit -> Vale.X64.Decls.va_code | Prims.Tot | [
"total"
] | [] | [
"Prims.unit",
"Vale.X64.Decls.va_Block",
"Vale.X64.Decls.va_CCons",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.InsBasic.va_code_Xgetbv_Avx512",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Vale.X64.Decls.va_CNil",
"Vale.X64.Decls.va_code"
] | [] | false | false | false | true | false | let va_code_Check_avx512_xcr0_support () =
| (va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_CCons (va_code_Xgetbv_Avx512 ())
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rRax))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 32))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRdx)
(va_const_opr64 128))
(va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRdx)
(va_const_shift_amt64 2))
(va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRcx)
(va_const_shift_amt64 1))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRdx))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_CNil ()))))))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_lemma_Check_movbe_support | val va_lemma_Check_movbe_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_movbe_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ va_get_reg64 rRbx va_sM == va_get_reg64
rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | val va_lemma_Check_movbe_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_movbe_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ va_get_reg64 rRbx va_sM == va_get_reg64
rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 566,
"start_col": 0,
"start_line": 551
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state
-> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.fuel",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Vale.X64.Decls.va_fuel",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.QuickCode.va_Mod_ok",
"Prims.Nil",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.list",
"Vale.X64.QuickCode.__proj__QProc__item__mods",
"Vale.Lib.X64.Cpuid.va_code_Check_movbe_support",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.tuple3",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCodes.va_wp_sound_code_norm",
"Prims.l_and",
"Vale.X64.QuickCodes.label",
"Vale.X64.QuickCodes.va_range1",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Prims.l_imp",
"Prims.l_not",
"Prims.int",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.CPU_Features_s.movbe_enabled",
"Vale.Def.Types_s.nat64",
"Vale.X64.QuickCode.quickCode",
"Vale.Lib.X64.Cpuid.va_qcode_Check_movbe_support"
] | [] | false | false | false | false | false | let va_lemma_Check_movbe_support va_b0 va_s0 =
| let va_mods:va_mods_t =
[
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
]
in
let va_qc = va_qcode_Check_movbe_support va_mods in
let va_sM, va_fM, va_g =
va_wp_sound_code_norm (va_code_Check_movbe_support ())
va_qc
va_s0
(fun va_s0 va_sM va_g ->
let () = va_g in
label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0))
in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
])
va_sM
va_s0;
(va_sM, va_fM) | false |
Pulse.Checker.Prover.ElimPure.fst | Pulse.Checker.Prover.ElimPure.tm_fstar | val tm_fstar : t: Pulse.Syntax.Base.host_term -> Pulse.Syntax.Base.term | let tm_fstar t = tm_fstar t Range.range_0 | {
"file_name": "lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 41,
"end_line": 56,
"start_col": 0,
"start_line": 56
} | (*
Copyright 2023 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module Pulse.Checker.Prover.ElimPure
module RT = FStar.Reflection.Typing
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module T = FStar.Tactics.V2
open FStar.List.Tot
open Pulse.Syntax
open Pulse.Checker.Pure
open Pulse.Checker.VPropEquiv
open Pulse.Typing
open Pulse.Typing.Combinators
module Metatheory = Pulse.Typing.Metatheory
open Pulse.Reflection.Util
open Pulse.Checker.Prover.Base
module RU = Pulse.RuntimeUtils
let elim_pure_head =
let elim_pure_explicit_lid = mk_pulse_lib_core_lid "elim_pure_explicit" in
tm_fvar (as_fv elim_pure_explicit_lid)
let elim_pure_head_ty =
// let open Pulse.Steel.Wrapper in
// let open Steel.Effect.Common in
let squash_p = mk_squash u0 (RT.bound_var 0) in
let pure_p = mk_pure (RT.bound_var 0) in
let post =
mk_abs squash_p R.Q_Explicit (R.pack_ln (R.Tv_FVar (R.pack_fv emp_lid)))
in
let cod = mk_stt_ghost_comp u0 squash_p pure_p post in
mk_arrow
(R.pack_ln (R.Tv_FVar (R.pack_fv R.prop_qn)), R.Q_Explicit)
cod
// Following crashes in extraction
// `(p:prop -> stt_ghost (squash p) emp_inames
// (pure p)
// (fun _ -> emp)) | {
"checked_file": "/",
"dependencies": [
"Pulse.Typing.Metatheory.fsti.checked",
"Pulse.Typing.Combinators.fsti.checked",
"Pulse.Typing.fst.checked",
"Pulse.Syntax.fst.checked",
"Pulse.RuntimeUtils.fsti.checked",
"Pulse.Reflection.Util.fst.checked",
"Pulse.Checker.VPropEquiv.fsti.checked",
"Pulse.Checker.Pure.fsti.checked",
"Pulse.Checker.Prover.Base.fsti.checked",
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked"
],
"interface_file": true,
"source_file": "Pulse.Checker.Prover.ElimPure.fst"
} | [
{
"abbrev": true,
"full_module": "Pulse.RuntimeUtils",
"short_module": "RU"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Reflection.Util",
"short_module": null
},
{
"abbrev": true,
"full_module": "Pulse.Typing.Metatheory",
"short_module": "Metatheory"
},
{
"abbrev": false,
"full_module": "Pulse.Typing.Combinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Typing",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.VPropEquiv",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Syntax",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Typing",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Syntax",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | t: Pulse.Syntax.Base.host_term -> Pulse.Syntax.Base.term | Prims.Tot | [
"total"
] | [] | [
"Pulse.Syntax.Base.host_term",
"Pulse.Syntax.Base.tm_fstar",
"FStar.Range.range_0",
"Pulse.Syntax.Base.term"
] | [] | false | false | false | true | false | let tm_fstar t =
| tm_fstar t Range.range_0 | false |
|
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_wpProof_Check_rdrand_support | val va_wpProof_Check_rdrand_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_rdrand_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_rdrand_support ())
([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx;
va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) | val va_wpProof_Check_rdrand_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_rdrand_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_rdrand_support ())
([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx;
va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) | let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 810,
"start_col": 0,
"start_line": 801
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_state",
"Prims.unit",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Prims.Nil",
"Prims._assert",
"Vale.X64.Decls.va_state_eq",
"Vale.X64.Decls.va_update_flags",
"Vale.X64.Decls.va_update_reg64",
"Vale.X64.Decls.va_update_ok",
"Vale.X64.Decls.va_lemma_upd_update",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.X64.State.vale_state",
"Vale.Lib.X64.Cpuid.va_lemma_Check_rdrand_support",
"Vale.Lib.X64.Cpuid.va_code_Check_rdrand_support"
] | [] | false | false | false | false | false | let va_wpProof_Check_rdrand_support va_s0 va_k =
| let va_sM, va_f0 = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
(va_update_flags va_sM
(va_update_reg64 rR9
va_sM
(va_update_reg64 rRdx
va_sM
(va_update_reg64 rRcx
va_sM
(va_update_reg64 rRbx
va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax
])
va_sM
va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_lemma_Check_sse_support | val va_lemma_Check_sse_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_sse_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ va_get_reg64 rRbx va_sM == va_get_reg64 rRbx
va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64
rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))))) | val va_lemma_Check_sse_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_sse_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ va_get_reg64 rRbx va_sM == va_get_reg64 rRbx
va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64
rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))))) | let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 706,
"start_col": 0,
"start_line": 691
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state
-> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.fuel",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Vale.X64.Decls.va_fuel",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.QuickCode.va_Mod_ok",
"Prims.Nil",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.list",
"Vale.X64.QuickCode.__proj__QProc__item__mods",
"Vale.Lib.X64.Cpuid.va_code_Check_sse_support",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.tuple3",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCodes.va_wp_sound_code_norm",
"Prims.l_and",
"Vale.X64.QuickCodes.label",
"Vale.X64.QuickCodes.va_range1",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Prims.l_imp",
"Prims.l_not",
"Prims.int",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.CPU_Features_s.sse_enabled",
"Vale.Def.Types_s.nat64",
"Vale.X64.QuickCode.quickCode",
"Vale.Lib.X64.Cpuid.va_qcode_Check_sse_support"
] | [] | false | false | false | false | false | let va_lemma_Check_sse_support va_b0 va_s0 =
| let va_mods:va_mods_t =
[
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
]
in
let va_qc = va_qcode_Check_sse_support va_mods in
let va_sM, va_fM, va_g =
va_wp_sound_code_norm (va_code_Check_sse_support ())
va_qc
va_s0
(fun va_s0 va_sM va_g ->
let () = va_g in
label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0))
in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
])
va_sM
va_s0;
(va_sM, va_fM) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_wpProof_Check_avx512_support | val va_wpProof_Check_avx512_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_avx512_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_avx512_support ())
([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) | val va_wpProof_Check_avx512_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_avx512_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_avx512_support ())
([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) | let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 994,
"start_col": 0,
"start_line": 985
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_state",
"Prims.unit",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR11",
"Vale.X64.Machine_s.rR10",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Prims.Nil",
"Prims._assert",
"Vale.X64.Decls.va_state_eq",
"Vale.X64.Decls.va_update_flags",
"Vale.X64.Decls.va_update_reg64",
"Vale.X64.Decls.va_update_ok",
"Vale.X64.Decls.va_lemma_upd_update",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.X64.State.vale_state",
"Vale.Lib.X64.Cpuid.va_lemma_Check_avx512_support",
"Vale.Lib.X64.Cpuid.va_code_Check_avx512_support"
] | [] | false | false | false | false | false | let va_wpProof_Check_avx512_support va_s0 va_k =
| let va_sM, va_f0 = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
(va_update_flags va_sM
(va_update_reg64 rR11
va_sM
(va_update_reg64 rR10
va_sM
(va_update_reg64 rR9
va_sM
(va_update_reg64 rRdx
va_sM
(va_update_reg64 rRcx
va_sM
(va_update_reg64 rRbx
va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR11;
va_Mod_reg64 rR10;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax
])
va_sM
va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | false |
MerkleTree.Low.Serialization.fst | MerkleTree.Low.Serialization.mt_serialize | val mt_serialize: mt:const_mt_p -> output:uint8_p -> sz:uint64_t -> HST.ST uint64_t
(requires (fun h0 -> mt_safe h0 (CB.cast mt) /\ B.live h0 output /\ B.length output = U64.v sz /\
HS.disjoint (B.frameOf output) (B.frameOf (CB.cast mt))))
(ensures (fun h0 _ h1 -> mt_safe h1 (CB.cast mt) /\ modifies (B.loc_buffer output) h0 h1)) | val mt_serialize: mt:const_mt_p -> output:uint8_p -> sz:uint64_t -> HST.ST uint64_t
(requires (fun h0 -> mt_safe h0 (CB.cast mt) /\ B.live h0 output /\ B.length output = U64.v sz /\
HS.disjoint (B.frameOf output) (B.frameOf (CB.cast mt))))
(ensures (fun h0 _ h1 -> mt_safe h1 (CB.cast mt) /\ modifies (B.loc_buffer output) h0 h1)) | let mt_serialize mt output sz =
let mt = CB.cast mt in
let sz = FStar.Int.Cast.uint64_to_uint32 sz in
let mtv = !*mt in
let h0 = HST.get() in
let ok, pos = serialize_uint8_t true 1uy output sz 0ul in // format version = 1uy
let h1 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h0 h1;
let ok, pos = serialize_uint32_t ok (MT?.hash_size mtv) output sz pos in
let h2 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h1 h2;
let ok, pos = serialize_offset_t ok (MT?.offset mtv) output sz pos in
let h3 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h2 h3;
let ok, pos = serialize_uint32_t ok (MT?.i mtv) output sz pos in
let h4 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h3 h4;
let ok, pos = serialize_uint32_t ok (MT?.j mtv) output sz pos in
let h5 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h4 h5;
let ok, pos = serialize_hash_vv ok (MT?.hs mtv) output sz pos in
let h6 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h5 h6;
let ok, pos = serialize_bool ok (MT?.rhs_ok mtv) output sz pos in
let h7 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h6 h7;
let ok, pos = serialize_hash_vec ok (MT?.rhs mtv) output sz pos in
let h8 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h7 h8;
let ok, pos = serialize_hash ok (MT?.mroot mtv) output sz pos in
let h9 = HST.get() in mt_safe_preserved mt (B.loc_buffer output) h8 h9;
if ok then (FStar.Int.Cast.uint32_to_uint64 pos) else 0UL | {
"file_name": "src/MerkleTree.Low.Serialization.fst",
"git_rev": "7d7bdc20f2033171e279c176b26e84f9069d23c6",
"git_url": "https://github.com/hacl-star/merkle-tree.git",
"project_name": "merkle-tree"
} | {
"end_col": 59,
"end_line": 442,
"start_col": 0,
"start_line": 419
} | module MerkleTree.Low.Serialization
open FStar.Integers
open FStar.Mul
open LowStar.Modifies
open LowStar.BufferOps
open LowStar.Vector
open LowStar.RVector
open LowStar.Regional
open LowStar.Regional.Instances
open MerkleTree.Low
module HS = FStar.HyperStack
module HST = FStar.HyperStack.ST
module HH = FStar.Monotonic.HyperHeap
module B = LowStar.Buffer
module CB = LowStar.ConstBuffer
module V = LowStar.Vector
module RV = LowStar.RVector
module RVI = LowStar.Regional.Instances
module U16 = FStar.UInt16
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U8 = FStar.UInt8
open MerkleTree.Low.Datastructures
open MerkleTree.Low.Hashfunctions
module MTS = MerkleTree.Spec
let uint8_t = U8.t
let uint16_t = U16.t
let uint32_t = U32.t
let uint64_t = U64.t
let uint8_p = B.buffer uint8_t
type const_uint8_p = const_pointer uint8_t
#reset-options "--z3rlimit 5 --initial_fuel 0 --max_fuel 0 --initial_ifuel 0 --max_ifuel 0"
private let serialize_bool (ok:bool) (x:bool) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
B.upd buf pos (if x then 1uy else 0uy);
(true, pos + 1ul)
end
private let serialize_uint8_t (ok:bool) (x:uint8_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin B.upd buf pos x;
(true, pos + 1ul)
end
private let serialize_uint16_t (ok:bool) (x:uint16_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint8_t ok (Int.Cast.uint16_to_uint8 (U16.shift_right x 8ul)) buf sz pos in
serialize_uint8_t ok (Int.Cast.uint16_to_uint8 x) buf sz pos
private let serialize_uint32_t (ok:bool) (x:uint32_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint16_t ok (Int.Cast.uint32_to_uint16 (U32.shift_right x 16ul)) buf sz pos in
serialize_uint16_t ok (Int.Cast.uint32_to_uint16 x) buf sz pos
private let serialize_uint64_t (ok:bool) (x:uint64_t) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) : HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= let ok, pos = serialize_uint32_t ok (Int.Cast.uint64_to_uint32 (U64.shift_right x 32ul)) buf sz pos in
serialize_uint32_t ok (Int.Cast.uint64_to_uint32 x) buf sz pos
private let serialize_offset_t = serialize_uint64_t
private let serialize_index_t = serialize_uint32_t
private let rec serialize_hash_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < hash_size})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else let b = x.(i) in
let ok, pos = serialize_uint8_t ok (Lib.RawIntTypes.u8_to_UInt8 b) buf sz pos in
let j = i + 1ul in
if j < hash_size then serialize_hash_i #hash_size ok x buf sz pos j
else (ok, pos)
private
let serialize_hash
(#hash_size:hash_size_t)
(ok:bool) (x:hash #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ B.live h0 x /\ B.len x = hash_size))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else serialize_hash_i ok x buf sz pos 0ul
private inline_for_extraction
let u64_add_fits (x:uint64_t) (y:uint64_t): Tot (r:bool{r ==> UInt.size (U64.v x + U64.v y) 64}) = uint64_max - x >= y
#push-options "--z3rlimit 100 --fuel 1 --quake 1/3"
private inline_for_extraction
let hash_vec_bytes
(#hash_size:hash_size_t)
(v:hash_vec #hash_size)
: Tot uint64_t
= let vs_hs = U64.mul (u32_64 (V.size_of v)) (u32_64 hash_size) in
if u64_add_fits vs_hs 4UL then vs_hs + 4UL else uint64_max
#pop-options
private
let rec serialize_hash_vec_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vec #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ loc_disjoint (B.loc_buffer buf) (loc_rvector x)))
(ensures (fun h0 _ h1 -> RV.rv_inv h1 x /\ modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let vi = V.index x i in
let ok, pos = serialize_hash ok vi buf sz pos in
let j = i + 1ul in
if j < V.size_of x then serialize_hash_vec_i ok x buf sz pos j
else (ok, pos)
end
private
let serialize_hash_vec
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vec #hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvreg hash_size) x)))
(ensures (fun h0 _ h1 -> RV.rv_inv h1 x /\ modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let h0 = HST.get() in
let ok, pos = serialize_uint32_t ok (V.size_of x) buf sz pos in
let h1 = HST.get() in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
if ok && V.size_of x > 0ul then serialize_hash_vec_i ok x buf sz pos 0ul
else (ok, pos)
end
private inline_for_extraction
let rec hash_vv_bytes_i
(#hash_size:hash_size_t)
(vv:hash_vv hash_size)
(i:uint32_t)
: HST.ST uint64_t
(requires (fun h0 -> V.live h0 vv))
(ensures (fun h0 _ h1 -> h0 == h1))
= if i >= V.size_of vv then 4UL
else begin
let vvi = V.index vv i in
let r = hash_vec_bytes vvi in
let rest = hash_vv_bytes_i vv (i+1ul) in
if u64_add_fits r rest then begin
assert (UInt.size (U64.v r + U64.v rest) 64);
r + rest
end
else uint64_max
end
private inline_for_extraction
let hash_vv_bytes
(#hash_size:hash_size_t)
(vv:hash_vv hash_size {V.size_of vv = merkle_tree_size_lg})
: HST.ST uint64_t
(requires (fun h0 -> V.live h0 vv))
(ensures (fun h0 _ h1 -> h0 == h1))
= hash_vv_bytes_i vv 0ul
private
let rec serialize_hash_vv_i
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vv hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t) (i:uint32_t{i < V.size_of x})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvvreg hash_size) x)))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let vi = V.index x i in
let h0 = HST.get() in
let ok, pos = serialize_hash_vec #hash_size ok vi buf sz pos in
let h1 = HST.get() in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
let j = i + 1ul in
if j < V.size_of x then
serialize_hash_vv_i #hash_size ok x buf sz pos j
else (ok, pos)
end
private
let serialize_hash_vv
(#hash_size:hash_size_t)
(ok:bool) (x:hash_vv hash_size) (buf:uint8_p) (sz:uint32_t{B.len buf = sz}) (pos:uint32_t)
: HST.ST (bool & uint32_t)
(requires (fun h0 -> B.live h0 buf /\ RV.rv_inv h0 x /\ HS.disjoint (B.frameOf buf) (Rgl?.region_of (hvvreg hash_size) x)))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer buf) h0 h1))
= if not ok || pos >= sz then (false, 0ul)
else begin
let h0 = HST.get() in
let ok, pos = serialize_uint32_t ok (V.size_of x) buf sz pos in
let h1 = HST.get() in
RV.rv_inv_preserved x (B.loc_buffer buf) h0 h1;
if (V.size_of x > 0ul) then serialize_hash_vv_i ok x buf sz pos 0ul
else (ok, pos)
end
private
let deserialize_bool (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & bool)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, false)
else (true, pos + 1ul, (match CB.index buf pos with| 0uy -> false | _ -> true))
private
let deserialize_uint8_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint8_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0uy)
else (true, pos + 1ul, CB.index buf pos)
private
let deserialize_uint16_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint16_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0us)
else begin
let ok, pos, b0 = deserialize_uint8_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint8_t ok buf sz pos in
(ok, pos, (U16.shift_left (Int.Cast.uint8_to_uint16 b0) 8ul) + Int.Cast.uint8_to_uint16 b1)
end
private
let deserialize_uint32_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint32_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0ul)
else begin
let ok, pos, b0 = deserialize_uint16_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint16_t ok buf sz pos in
(ok, pos, (U32.shift_left (Int.Cast.uint16_to_uint32 b0) 16ul) + Int.Cast.uint16_to_uint32 b1)
end
private
let deserialize_uint64_t (ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (pos:uint32_t): HST.ST (bool & uint32_t & uint64_t)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> h0 == h1))
= if not ok || pos >= sz then (false, pos, 0UL)
else begin
let ok, pos, b0 = deserialize_uint32_t ok buf sz pos in
let ok, pos, b1 = deserialize_uint32_t ok buf sz pos in
(ok, pos, (U64.shift_left (u32_64 b0) 32ul) + u32_64 b1)
end
private let deserialize_offset_t = deserialize_uint64_t
private let deserialize_index_t = deserialize_uint32_t
private
let deserialize_hash
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 (k, _, h) h1 -> (k ==> Rgl?.r_inv (hreg hash_size) h1 h) /\
loc_disjoint (loc_buffer (CB.cast buf)) (loc_buffer h) /\
modifies B.loc_none h0 h1))
= let rg = hreg hash_size in
if not ok || pos >= sz then (false, pos, rg_dummy rg)
else if sz - pos < hash_size then (false, pos, rg_dummy rg)
else begin
let hash = rg_alloc rg r in
Lib.RawBuffer.blit (CB.cast buf) pos hash 0ul hash_size;
(true, pos + hash_size, hash)
end
private
let rec deserialize_hash_vec_i
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t) (res:hash_vec #hash_size) (i:uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> CB.live h0 buf /\ V.live h0 res))
(ensures (fun h0 _ h1 -> B.modifies (B.loc_buffer (V.Vec?.vs res)) h0 h1))
= if not ok || pos >= sz then (false, pos)
else begin
let ok, pos, h = deserialize_hash ok buf sz r pos in
if not ok then (false, pos)
else begin
V.assign res i h;
(*
* AR: 04/01: The call deserialize_hash_vec_i below needs liveness of buf
* So we have to frame buf liveness for the V.assign call
* V.assign provides a modifies postcondition in terms of
* loc_vector_within, which is a recursive predicate and
* I guess hard to reason about directly
* Whereas to reason about liveness of buf, we only need an
* overapproximation that V.assign modifies V.Vec?.vs res
* Looking at the Vector library, I found the following lemma
* that does the trick
*)
V.loc_vector_within_included res i (i + 1ul);
let j = i + 1ul in
if j < V.size_of res then deserialize_hash_vec_i ok buf sz r pos res j
else (true, pos)
end
end
private
let deserialize_hash_vec
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash_vec #hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> B.modifies B.loc_none h0 h1))
= let rg = hvreg hash_size in
if not ok || pos >= sz then (false, pos, rg_dummy rg)
else begin
let ok, pos, n = deserialize_uint32_t ok buf sz pos in
if not ok then (false, pos, V.alloc_empty hash)
else if n = 0ul then (true, pos, V.alloc_empty hash)
else begin
let hrg = hreg hash_size in
let res = V.alloc n (rg_dummy hrg) in
let ok, pos = deserialize_hash_vec_i ok buf sz r pos res 0ul in
(ok, pos, res)
end
end
private
let rec deserialize_hash_vv_i
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t) (res:hash_vv hash_size) (i:uint32_t{i < V.size_of res})
: HST.ST (bool & uint32_t)
(requires (fun h0 -> CB.live h0 buf /\ V.live h0 res /\
B.loc_disjoint (CB.loc_buffer buf) (V.loc_vector res)))
(ensures (fun h0 _ h1 -> modifies (B.loc_buffer (V.Vec?.vs res)) h0 h1))
=
if not ok || pos >= sz then (false, 0ul)
else begin
let ok, pos, hv = deserialize_hash_vec ok buf sz r pos in
let h0 = HST.get() in
if not ok then (false, pos)
else begin
V.assign res i hv;
(*
* AR: 04/01: The call deserialize_hash_vv_i below needs liveness of buf
* So we have to frame buf liveness for the V.assign call
* V.assign provides a modifies postcondition in terms of
* loc_vector_within, which is a recursive predicate and
* I guess hard to reason about directly
* Whereas to reason about liveness of buf, we only need an
* overapproximation that V.assign modifies V.Vec?.vs res
* Looking at the Vector library, I found the following lemma
* that does the trick
*)
V.loc_vector_within_included res i (i + 1ul);
let j = i + 1ul in
if j = V.size_of res then (true, pos)
else deserialize_hash_vv_i ok buf sz r pos res j
end
end
private let deserialize_hash_vv
(#hash_size:hash_size_t)
(ok:bool) (buf:const_uint8_p) (sz:uint32_t{CB.length buf = U32.v sz}) (r:HST.erid) (pos:uint32_t)
: HST.ST (bool & uint32_t & hash_vv hash_size)
(requires (fun h0 -> CB.live h0 buf))
(ensures (fun h0 _ h1 -> modifies B.loc_none h0 h1))
= if not ok || pos >= sz then (false, pos, V.alloc_empty hash_vec)
else begin
let ok, pos, n = deserialize_uint32_t ok buf sz pos in
if not ok then (false, pos, V.alloc_empty hash_vec)
else if n = 0ul then (true, pos, V.alloc_empty hash_vec)
else begin
let rg = hvreg hash_size in
let res = V.alloc n (rg_dummy rg) in
let ok, pos = deserialize_hash_vv_i ok buf sz r pos res 0ul in
(ok, pos, res)
end
end
#push-options "--z3rlimit 10"
val mt_serialize_size: mt:const_mt_p -> HST.ST uint64_t
(requires (fun h0 -> mt_safe h0 (CB.cast mt)))
(ensures (fun _ _ h1 -> mt_safe h1 (CB.cast mt)))
let mt_serialize_size mt =
let mtv = !*(CB.cast mt) in
let hs = MT?.hs mtv in
let rhs_ok = MT?.rhs_ok mtv in
let rhs = MT?.rhs mtv in
let hs_sz = hash_vv_bytes hs in
if hs_sz < uint32_max then
1UL + // format version
4UL + // hash_size
8UL + // offset
4UL + 4UL + // i, j
hs_sz + // hs
1UL + // rhs_ok
hash_vec_bytes rhs + // rhs
u32_64 (MT?.hash_size mtv) // mroot
else
uint64_max
#pop-options
#push-options "--z3rlimit 15 --initial_fuel 1 --max_fuel 1"
val mt_serialize: mt:const_mt_p -> output:uint8_p -> sz:uint64_t -> HST.ST uint64_t
(requires (fun h0 -> mt_safe h0 (CB.cast mt) /\ B.live h0 output /\ B.length output = U64.v sz /\
HS.disjoint (B.frameOf output) (B.frameOf (CB.cast mt)))) | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"MerkleTree.Spec.fst.checked",
"MerkleTree.Low.Hashfunctions.fst.checked",
"MerkleTree.Low.Datastructures.fst.checked",
"MerkleTree.Low.fst.checked",
"LowStar.Vector.fst.checked",
"LowStar.RVector.fst.checked",
"LowStar.Regional.Instances.fst.checked",
"LowStar.Regional.fst.checked",
"LowStar.Modifies.fst.checked",
"LowStar.ConstBuffer.fsti.checked",
"LowStar.BufferOps.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.RawIntTypes.fsti.checked",
"Lib.RawBuffer.fsti.checked",
"FStar.UInt8.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt16.fsti.checked",
"FStar.UInt.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Monotonic.HyperHeap.fsti.checked",
"FStar.Integers.fst.checked",
"FStar.Int.Cast.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "MerkleTree.Low.Serialization.fst"
} | [
{
"abbrev": true,
"full_module": "MerkleTree.Spec",
"short_module": "MTS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Hashfunctions",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low.Datastructures",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.UInt8",
"short_module": "U8"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "FStar.UInt16",
"short_module": "U16"
},
{
"abbrev": true,
"full_module": "LowStar.Regional.Instances",
"short_module": "RVI"
},
{
"abbrev": true,
"full_module": "LowStar.RVector",
"short_module": "RV"
},
{
"abbrev": true,
"full_module": "LowStar.Vector",
"short_module": "V"
},
{
"abbrev": true,
"full_module": "LowStar.ConstBuffer",
"short_module": "CB"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.Monotonic.HyperHeap",
"short_module": "HH"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "HST"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "MerkleTree.Low",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Regional.Instances",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Regional",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.RVector",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Vector",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.BufferOps",
"short_module": null
},
{
"abbrev": false,
"full_module": "LowStar.Modifies",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low",
"short_module": null
},
{
"abbrev": false,
"full_module": "MerkleTree.Low",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 1,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 15,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
mt: MerkleTree.Low.const_mt_p ->
output: MerkleTree.Low.Serialization.uint8_p ->
sz: MerkleTree.Low.Serialization.uint64_t
-> FStar.HyperStack.ST.ST MerkleTree.Low.Serialization.uint64_t | FStar.HyperStack.ST.ST | [] | [] | [
"MerkleTree.Low.const_mt_p",
"MerkleTree.Low.Serialization.uint8_p",
"MerkleTree.Low.Serialization.uint64_t",
"Prims.bool",
"MerkleTree.Low.Serialization.uint32_t",
"FStar.Int.Cast.uint32_to_uint64",
"FStar.UInt64.__uint_to_t",
"Prims.unit",
"MerkleTree.Low.mt_safe_preserved",
"LowStar.Monotonic.Buffer.loc_buffer",
"MerkleTree.Low.Serialization.uint8_t",
"LowStar.Buffer.trivial_preorder",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get",
"FStar.Pervasives.Native.tuple2",
"MerkleTree.Low.Serialization.serialize_hash",
"MerkleTree.Low.__proj__MT__item__hash_size",
"MerkleTree.Low.__proj__MT__item__mroot",
"MerkleTree.Low.Serialization.serialize_hash_vec",
"MerkleTree.Low.__proj__MT__item__rhs",
"MerkleTree.Low.Serialization.serialize_bool",
"MerkleTree.Low.__proj__MT__item__rhs_ok",
"MerkleTree.Low.Serialization.serialize_hash_vv",
"MerkleTree.Low.__proj__MT__item__hs",
"MerkleTree.Low.Serialization.serialize_uint32_t",
"MerkleTree.Low.__proj__MT__item__j",
"MerkleTree.Low.__proj__MT__item__i",
"MerkleTree.Low.Serialization.serialize_offset_t",
"MerkleTree.Low.__proj__MT__item__offset",
"MerkleTree.Low.Serialization.serialize_uint8_t",
"FStar.UInt8.__uint_to_t",
"FStar.UInt32.__uint_to_t",
"MerkleTree.Low.merkle_tree",
"LowStar.BufferOps.op_Bang_Star",
"LowStar.ConstBuffer.qbuf_pre",
"LowStar.ConstBuffer.as_qbuf",
"FStar.UInt32.t",
"Prims.b2t",
"Prims.op_Equality",
"Prims.int",
"FStar.UInt32.v",
"Prims.op_Modulus",
"FStar.UInt64.v",
"Prims.pow2",
"FStar.Int.Cast.uint64_to_uint32",
"LowStar.Monotonic.Buffer.mbuffer",
"LowStar.ConstBuffer.cast"
] | [] | false | true | false | false | false | let mt_serialize mt output sz =
| let mt = CB.cast mt in
let sz = FStar.Int.Cast.uint64_to_uint32 sz in
let mtv = !*mt in
let h0 = HST.get () in
let ok, pos = serialize_uint8_t true 1uy output sz 0ul in
let h1 = HST.get () in
mt_safe_preserved mt (B.loc_buffer output) h0 h1;
let ok, pos = serialize_uint32_t ok (MT?.hash_size mtv) output sz pos in
let h2 = HST.get () in
mt_safe_preserved mt (B.loc_buffer output) h1 h2;
let ok, pos = serialize_offset_t ok (MT?.offset mtv) output sz pos in
let h3 = HST.get () in
mt_safe_preserved mt (B.loc_buffer output) h2 h3;
let ok, pos = serialize_uint32_t ok (MT?.i mtv) output sz pos in
let h4 = HST.get () in
mt_safe_preserved mt (B.loc_buffer output) h3 h4;
let ok, pos = serialize_uint32_t ok (MT?.j mtv) output sz pos in
let h5 = HST.get () in
mt_safe_preserved mt (B.loc_buffer output) h4 h5;
let ok, pos = serialize_hash_vv ok (MT?.hs mtv) output sz pos in
let h6 = HST.get () in
mt_safe_preserved mt (B.loc_buffer output) h5 h6;
let ok, pos = serialize_bool ok (MT?.rhs_ok mtv) output sz pos in
let h7 = HST.get () in
mt_safe_preserved mt (B.loc_buffer output) h6 h7;
let ok, pos = serialize_hash_vec ok (MT?.rhs mtv) output sz pos in
let h8 = HST.get () in
mt_safe_preserved mt (B.loc_buffer output) h7 h8;
let ok, pos = serialize_hash ok (MT?.mroot mtv) output sz pos in
let h9 = HST.get () in
mt_safe_preserved mt (B.loc_buffer output) h8 h9;
if ok then (FStar.Int.Cast.uint32_to_uint64 pos) else 0uL | false |
Pulse.Checker.Prover.ElimPure.fst | Pulse.Checker.Prover.ElimPure.mk | val mk (#g: env) (#v: vprop) (v_typing: tot_typing g v tm_vprop)
: T.Tac
(option (x: ppname & t: st_term & c: comp{stateful_comp c /\ comp_pre c == v} & st_typing g t c)
) | val mk (#g: env) (#v: vprop) (v_typing: tot_typing g v tm_vprop)
: T.Tac
(option (x: ppname & t: st_term & c: comp{stateful_comp c /\ comp_pre c == v} & st_typing g t c)
) | let mk (#g:env) (#v:vprop) (v_typing:tot_typing g v tm_vprop)
: T.Tac (option (x:ppname &
t:st_term &
c:comp { stateful_comp c /\ comp_pre c == v } &
st_typing g t c)) =
match v.t with
| Tm_Pure {t=Tm_FStar pp} ->
let p_typing =
Metatheory.pure_typing_inversion #g #(tm_fstar pp) v_typing in
Some (| ppname_default,
mk_elim_pure (tm_fstar pp),
elim_pure_comp pp,
elim_pure_typing g pp p_typing |)
| _ -> None | {
"file_name": "lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 13,
"end_line": 105,
"start_col": 0,
"start_line": 92
} | (*
Copyright 2023 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module Pulse.Checker.Prover.ElimPure
module RT = FStar.Reflection.Typing
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module T = FStar.Tactics.V2
open FStar.List.Tot
open Pulse.Syntax
open Pulse.Checker.Pure
open Pulse.Checker.VPropEquiv
open Pulse.Typing
open Pulse.Typing.Combinators
module Metatheory = Pulse.Typing.Metatheory
open Pulse.Reflection.Util
open Pulse.Checker.Prover.Base
module RU = Pulse.RuntimeUtils
let elim_pure_head =
let elim_pure_explicit_lid = mk_pulse_lib_core_lid "elim_pure_explicit" in
tm_fvar (as_fv elim_pure_explicit_lid)
let elim_pure_head_ty =
// let open Pulse.Steel.Wrapper in
// let open Steel.Effect.Common in
let squash_p = mk_squash u0 (RT.bound_var 0) in
let pure_p = mk_pure (RT.bound_var 0) in
let post =
mk_abs squash_p R.Q_Explicit (R.pack_ln (R.Tv_FVar (R.pack_fv emp_lid)))
in
let cod = mk_stt_ghost_comp u0 squash_p pure_p post in
mk_arrow
(R.pack_ln (R.Tv_FVar (R.pack_fv R.prop_qn)), R.Q_Explicit)
cod
// Following crashes in extraction
// `(p:prop -> stt_ghost (squash p) emp_inames
// (pure p)
// (fun _ -> emp))
let tm_fstar t = tm_fstar t Range.range_0
let elim_pure_head_typing (g:env)
: tot_typing g elim_pure_head (tm_fstar elim_pure_head_ty)
= admit()
let mk_elim_pure (p:term)
: st_term
= let t = Tm_STApp { head = elim_pure_head;
arg_qual = None;
arg = p }
in
wtag (Some STT_Ghost) t
let elim_pure_comp (p:host_term) =
let st : st_comp = {
u=u_zero;
res=tm_fstar (mk_squash u0 p);
pre=tm_pure (tm_fstar p);
post=tm_emp
} in
C_STGhost st
#push-options "--admit_smt_queries true"
let elim_pure_typing (g:env) (p:host_term)
(p_prop:tot_typing g (tm_fstar p) (tm_fstar RT.tm_prop))
: st_typing g (mk_elim_pure (tm_fstar p)) (elim_pure_comp p)
= T_STApp g elim_pure_head (tm_fstar RT.tm_prop) None (elim_pure_comp p) _ (elim_pure_head_typing g) p_prop
#pop-options
let is_elim_pure (vp:term) : T.Tac bool =
match vp.t with
| Tm_Pure {t=Tm_FStar _} -> true
| _ -> false | {
"checked_file": "/",
"dependencies": [
"Pulse.Typing.Metatheory.fsti.checked",
"Pulse.Typing.Combinators.fsti.checked",
"Pulse.Typing.fst.checked",
"Pulse.Syntax.fst.checked",
"Pulse.RuntimeUtils.fsti.checked",
"Pulse.Reflection.Util.fst.checked",
"Pulse.Checker.VPropEquiv.fsti.checked",
"Pulse.Checker.Pure.fsti.checked",
"Pulse.Checker.Prover.Base.fsti.checked",
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked"
],
"interface_file": true,
"source_file": "Pulse.Checker.Prover.ElimPure.fst"
} | [
{
"abbrev": true,
"full_module": "Pulse.RuntimeUtils",
"short_module": "RU"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Reflection.Util",
"short_module": null
},
{
"abbrev": true,
"full_module": "Pulse.Typing.Metatheory",
"short_module": "Metatheory"
},
{
"abbrev": false,
"full_module": "Pulse.Typing.Combinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Typing",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.VPropEquiv",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Syntax",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Typing",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Syntax",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | v_typing: Pulse.Typing.tot_typing g v Pulse.Syntax.Base.tm_vprop
-> FStar.Tactics.Effect.Tac
(FStar.Pervasives.Native.option (FStar.Pervasives.dtuple4 Pulse.Syntax.Base.ppname
(fun _ -> Pulse.Syntax.Base.st_term)
(fun _ _ ->
c:
Pulse.Syntax.Base.comp
{Pulse.Syntax.Base.stateful_comp c /\ Pulse.Syntax.Base.comp_pre c == v})
(fun _ t c -> Pulse.Typing.st_typing g t c))) | FStar.Tactics.Effect.Tac | [] | [] | [
"Pulse.Typing.Env.env",
"Pulse.Syntax.Base.vprop",
"Pulse.Typing.tot_typing",
"Pulse.Syntax.Base.tm_vprop",
"Pulse.Syntax.Base.__proj__Mkterm__item__t",
"Pulse.Syntax.Base.host_term",
"Pulse.Syntax.Base.range",
"FStar.Pervasives.Native.Some",
"FStar.Pervasives.dtuple4",
"Pulse.Syntax.Base.ppname",
"Pulse.Syntax.Base.st_term",
"Pulse.Syntax.Base.comp",
"Prims.l_and",
"Prims.b2t",
"Pulse.Syntax.Base.stateful_comp",
"Prims.eq2",
"Pulse.Syntax.Base.comp_pre",
"Pulse.Typing.st_typing",
"FStar.Pervasives.Mkdtuple4",
"Pulse.Syntax.Base.ppname_default",
"Pulse.Checker.Prover.ElimPure.mk_elim_pure",
"Pulse.Checker.Prover.ElimPure.tm_fstar",
"Pulse.Checker.Prover.ElimPure.elim_pure_comp",
"Pulse.Checker.Prover.ElimPure.elim_pure_typing",
"Pulse.Syntax.Base.tm_fstar",
"FStar.Reflection.Typing.tm_prop",
"FStar.Range.range_0",
"Pulse.Typing.Metatheory.Base.pure_typing_inversion",
"Pulse.Syntax.Base.term'",
"FStar.Pervasives.Native.None",
"FStar.Pervasives.Native.option"
] | [] | false | true | false | false | false | let mk (#g: env) (#v: vprop) (v_typing: tot_typing g v tm_vprop)
: T.Tac
(option (x: ppname & t: st_term & c: comp{stateful_comp c /\ comp_pre c == v} & st_typing g t c)
) =
| match v.t with
| Tm_Pure { t = Tm_FStar pp } ->
let p_typing = Metatheory.pure_typing_inversion #g #(tm_fstar pp) v_typing in
Some
(|
ppname_default,
mk_elim_pure (tm_fstar pp),
elim_pure_comp pp,
elim_pure_typing g pp p_typing
|)
| _ -> None | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_qcode_Check_osxsave_support | val va_qcode_Check_osxsave_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_osxsave_support ())) | val va_qcode_Check_osxsave_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_osxsave_support ())) | let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 1055,
"start_col": 0,
"start_line": 1023
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_mods: Vale.X64.QuickCode.va_mods_t
-> Vale.X64.QuickCode.va_quickCode Prims.unit
(Vale.Lib.X64.Cpuid.va_code_Check_osxsave_support ()) | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.QuickCode.va_mods_t",
"Vale.X64.QuickCodes.qblock",
"Prims.unit",
"Prims.Cons",
"Vale.X64.Decls.va_code",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_code_Cpuid_Osxsave",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Prims.Nil",
"Vale.X64.Machine_s.precode",
"Vale.X64.Decls.ins",
"Vale.X64.Decls.ocmp",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.va_QSeq",
"Vale.X64.QuickCodes.va_range1",
"Vale.X64.InsBasic.va_quick_Mov64",
"Vale.X64.QuickCodes.va_QBind",
"Vale.X64.InsBasic.va_quick_Cpuid_Osxsave",
"Vale.X64.QuickCodes.va_qPURE",
"Prims.pure_post",
"Prims.l_and",
"Prims.l_True",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Vale.Def.Types_s.iand",
"Prims.op_GreaterThan",
"Prims.op_GreaterThanOrEqual",
"Vale.Arch.TypesNative.lemma_iand_pow2_64",
"Vale.X64.InsBasic.va_quick_And64",
"Vale.X64.QuickCodes.va_QLemma",
"FStar.Pervasives.normalize",
"Prims.squash",
"Vale.Lib.Basic.assert_normalize",
"Vale.X64.InsBasic.va_quick_Shr64",
"Prims.op_LessThanOrEqual",
"Vale.Def.Types_s.ishr",
"Prims.op_Subtraction",
"Vale.Arch.TypesNative.lemma_ishr_pow2_diff64",
"Vale.Arch.TypesNative.lemma_ishr_zero64",
"Vale.X64.QuickCodes.va_QEmpty",
"Vale.X64.QuickCodes.quickCodes",
"Vale.Def.Words_s.nat64",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCode.va_quickCode",
"Vale.Lib.X64.Cpuid.va_code_Check_osxsave_support"
] | [] | false | false | false | false | false | let va_qcode_Check_osxsave_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_osxsave_support ())) =
| (qblock va_mods
(fun (va_s: va_state) ->
let va_old_s:va_state = va_s in
va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ())
(fun (va_s: va_state) _ ->
let va_arg14:Vale.Def.Types_s.nat64 = va_get_reg64 rRcx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 134217728))
(fun (va_s: va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (134217728 ==
Prims.pow2 27))
(fun _ ->
(fun (p: prop) -> p) (134217728 == Prims.pow2 27))
(fun (_: unit) ->
assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 26))
(fun (va_s: va_state) _ ->
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
1
27)
(va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_zero64 26
)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx
)
(va_op_opr64_reg64 rR9))
(va_QEmpty (()))))))))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_lemma_Check_rdrand_support | val va_lemma_Check_rdrand_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_rdrand_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ va_get_reg64 rRbx va_sM == va_get_reg64
rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | val va_lemma_Check_rdrand_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_rdrand_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ va_get_reg64 rRbx va_sM == va_get_reg64
rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 797,
"start_col": 0,
"start_line": 782
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state
-> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.fuel",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Vale.X64.Decls.va_fuel",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.QuickCode.va_Mod_ok",
"Prims.Nil",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.list",
"Vale.X64.QuickCode.__proj__QProc__item__mods",
"Vale.Lib.X64.Cpuid.va_code_Check_rdrand_support",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.tuple3",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCodes.va_wp_sound_code_norm",
"Prims.l_and",
"Vale.X64.QuickCodes.label",
"Vale.X64.QuickCodes.va_range1",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Prims.l_imp",
"Prims.l_not",
"Prims.int",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.CPU_Features_s.rdrand_enabled",
"Vale.Def.Types_s.nat64",
"Vale.X64.QuickCode.quickCode",
"Vale.Lib.X64.Cpuid.va_qcode_Check_rdrand_support"
] | [] | false | false | false | false | false | let va_lemma_Check_rdrand_support va_b0 va_s0 =
| let va_mods:va_mods_t =
[
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
]
in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let va_sM, va_fM, va_g =
va_wp_sound_code_norm (va_code_Check_rdrand_support ())
va_qc
va_s0
(fun va_s0 va_sM va_g ->
let () = va_g in
label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0))
in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
])
va_sM
va_s0;
(va_sM, va_fM) | false |
Pulse.Checker.Prover.ElimPure.fst | Pulse.Checker.Prover.ElimPure.elim_pure | val elim_pure (#g:env) (#ctxt:term) (ctxt_typing:tot_typing g ctxt tm_vprop)
: T.Tac (g':env { env_extends g' g } &
ctxt':term &
tot_typing g' ctxt' tm_vprop &
continuation_elaborator g ctxt g' ctxt') | val elim_pure (#g:env) (#ctxt:term) (ctxt_typing:tot_typing g ctxt tm_vprop)
: T.Tac (g':env { env_extends g' g } &
ctxt':term &
tot_typing g' ctxt' tm_vprop &
continuation_elaborator g ctxt g' ctxt') | let elim_pure (#g:env) (#ctxt:term) (ctxt_typing:tot_typing g ctxt tm_vprop)
: T.Tac (g':env { env_extends g' g } &
ctxt':term &
tot_typing g' ctxt' tm_vprop &
continuation_elaborator g ctxt g' ctxt') =
let ctxt_emp_typing : tot_typing g (tm_star ctxt tm_emp) tm_vprop = RU.magic () in
let (| g', ctxt', ctxt'_emp_typing, k |) =
elim_pure_frame ctxt_emp_typing (mk_env (fstar_env g)) in
let k = k_elab_equiv k (VE_Trans _ _ _ _ (VE_Comm _ _ _) (VE_Unit _ _))
(VE_Trans _ _ _ _ (VE_Comm _ _ _) (VE_Unit _ _)) in
(| g', ctxt', star_typing_inversion_l ctxt'_emp_typing, k |) | {
"file_name": "lib/steel/pulse/Pulse.Checker.Prover.ElimPure.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 62,
"end_line": 126,
"start_col": 0,
"start_line": 116
} | (*
Copyright 2023 Microsoft Research
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*)
module Pulse.Checker.Prover.ElimPure
module RT = FStar.Reflection.Typing
module R = FStar.Reflection.V2
module L = FStar.List.Tot
module T = FStar.Tactics.V2
open FStar.List.Tot
open Pulse.Syntax
open Pulse.Checker.Pure
open Pulse.Checker.VPropEquiv
open Pulse.Typing
open Pulse.Typing.Combinators
module Metatheory = Pulse.Typing.Metatheory
open Pulse.Reflection.Util
open Pulse.Checker.Prover.Base
module RU = Pulse.RuntimeUtils
let elim_pure_head =
let elim_pure_explicit_lid = mk_pulse_lib_core_lid "elim_pure_explicit" in
tm_fvar (as_fv elim_pure_explicit_lid)
let elim_pure_head_ty =
// let open Pulse.Steel.Wrapper in
// let open Steel.Effect.Common in
let squash_p = mk_squash u0 (RT.bound_var 0) in
let pure_p = mk_pure (RT.bound_var 0) in
let post =
mk_abs squash_p R.Q_Explicit (R.pack_ln (R.Tv_FVar (R.pack_fv emp_lid)))
in
let cod = mk_stt_ghost_comp u0 squash_p pure_p post in
mk_arrow
(R.pack_ln (R.Tv_FVar (R.pack_fv R.prop_qn)), R.Q_Explicit)
cod
// Following crashes in extraction
// `(p:prop -> stt_ghost (squash p) emp_inames
// (pure p)
// (fun _ -> emp))
let tm_fstar t = tm_fstar t Range.range_0
let elim_pure_head_typing (g:env)
: tot_typing g elim_pure_head (tm_fstar elim_pure_head_ty)
= admit()
let mk_elim_pure (p:term)
: st_term
= let t = Tm_STApp { head = elim_pure_head;
arg_qual = None;
arg = p }
in
wtag (Some STT_Ghost) t
let elim_pure_comp (p:host_term) =
let st : st_comp = {
u=u_zero;
res=tm_fstar (mk_squash u0 p);
pre=tm_pure (tm_fstar p);
post=tm_emp
} in
C_STGhost st
#push-options "--admit_smt_queries true"
let elim_pure_typing (g:env) (p:host_term)
(p_prop:tot_typing g (tm_fstar p) (tm_fstar RT.tm_prop))
: st_typing g (mk_elim_pure (tm_fstar p)) (elim_pure_comp p)
= T_STApp g elim_pure_head (tm_fstar RT.tm_prop) None (elim_pure_comp p) _ (elim_pure_head_typing g) p_prop
#pop-options
let is_elim_pure (vp:term) : T.Tac bool =
match vp.t with
| Tm_Pure {t=Tm_FStar _} -> true
| _ -> false
let mk (#g:env) (#v:vprop) (v_typing:tot_typing g v tm_vprop)
: T.Tac (option (x:ppname &
t:st_term &
c:comp { stateful_comp c /\ comp_pre c == v } &
st_typing g t c)) =
match v.t with
| Tm_Pure {t=Tm_FStar pp} ->
let p_typing =
Metatheory.pure_typing_inversion #g #(tm_fstar pp) v_typing in
Some (| ppname_default,
mk_elim_pure (tm_fstar pp),
elim_pure_comp pp,
elim_pure_typing g pp p_typing |)
| _ -> None
let elim_pure_frame (#g:env) (#ctxt:term) (#frame:term)
(ctxt_frame_typing:tot_typing g (ctxt * frame) tm_vprop)
(uvs:env { disjoint uvs g })
: T.Tac (g':env { env_extends g' g /\ disjoint uvs g' } &
ctxt':term &
tot_typing g' (ctxt' * frame) tm_vprop &
continuation_elaborator g (ctxt * frame) g' (ctxt' * frame)) =
add_elims is_elim_pure mk ctxt_frame_typing uvs | {
"checked_file": "/",
"dependencies": [
"Pulse.Typing.Metatheory.fsti.checked",
"Pulse.Typing.Combinators.fsti.checked",
"Pulse.Typing.fst.checked",
"Pulse.Syntax.fst.checked",
"Pulse.RuntimeUtils.fsti.checked",
"Pulse.Reflection.Util.fst.checked",
"Pulse.Checker.VPropEquiv.fsti.checked",
"Pulse.Checker.Pure.fsti.checked",
"Pulse.Checker.Prover.Base.fsti.checked",
"prims.fst.checked",
"FStar.Tactics.V2.fst.checked",
"FStar.Reflection.V2.fst.checked",
"FStar.Reflection.Typing.fsti.checked",
"FStar.Range.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.List.Tot.fst.checked"
],
"interface_file": true,
"source_file": "Pulse.Checker.Prover.ElimPure.fst"
} | [
{
"abbrev": true,
"full_module": "Pulse.RuntimeUtils",
"short_module": "RU"
},
{
"abbrev": false,
"full_module": "Pulse.Reflection.Util",
"short_module": null
},
{
"abbrev": true,
"full_module": "Pulse.Typing.Metatheory",
"short_module": "Metatheory"
},
{
"abbrev": false,
"full_module": "Pulse.Typing.Combinators",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.VPropEquiv",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Pure",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.List.Tot",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.List.Tot",
"short_module": "L"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.V2",
"short_module": "R"
},
{
"abbrev": true,
"full_module": "FStar.Reflection.Typing",
"short_module": "RT"
},
{
"abbrev": true,
"full_module": "FStar.Tactics.V2",
"short_module": "T"
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Base",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Typing",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Syntax",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Checker.Prover",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | ctxt_typing: Pulse.Typing.tot_typing g ctxt Pulse.Syntax.Base.tm_vprop
-> FStar.Tactics.Effect.Tac
(FStar.Pervasives.dtuple4 (g': Pulse.Typing.Env.env{Pulse.Typing.Env.env_extends g' g})
(fun _ -> Pulse.Syntax.Base.term)
(fun g' ctxt' -> Pulse.Typing.tot_typing g' ctxt' Pulse.Syntax.Base.tm_vprop)
(fun g' ctxt' _ -> Pulse.Checker.Base.continuation_elaborator g ctxt g' ctxt')) | FStar.Tactics.Effect.Tac | [] | [] | [
"Pulse.Typing.Env.env",
"Pulse.Syntax.Base.term",
"Pulse.Typing.tot_typing",
"Pulse.Syntax.Base.tm_vprop",
"Prims.l_and",
"Pulse.Typing.Env.env_extends",
"Pulse.Typing.Env.disjoint",
"Pulse.Typing.Env.mk_env",
"Pulse.Typing.Env.fstar_env",
"Pulse.Checker.Prover.Base.op_Star",
"Pulse.Syntax.Base.tm_emp",
"Pulse.Checker.Base.continuation_elaborator",
"FStar.Pervasives.Mkdtuple4",
"Pulse.Typing.star_typing_inversion_l",
"Pulse.Checker.Base.k_elab_equiv",
"Pulse.Typing.VE_Trans",
"Pulse.Syntax.Base.tm_star",
"Pulse.Typing.VE_Comm",
"Pulse.Typing.VE_Unit",
"FStar.Pervasives.dtuple4",
"Pulse.Checker.Prover.ElimPure.elim_pure_frame",
"Pulse.RuntimeUtils.magic"
] | [] | false | true | false | false | false | let elim_pure (#g: env) (#ctxt: term) (ctxt_typing: tot_typing g ctxt tm_vprop)
: T.Tac
(g': env{env_extends g' g} &
ctxt': term &
tot_typing g' ctxt' tm_vprop &
continuation_elaborator g ctxt g' ctxt') =
| let ctxt_emp_typing:tot_typing g (tm_star ctxt tm_emp) tm_vprop = RU.magic () in
let (| g' , ctxt' , ctxt'_emp_typing , k |) =
elim_pure_frame ctxt_emp_typing (mk_env (fstar_env g))
in
let k =
k_elab_equiv k
(VE_Trans _ _ _ _ (VE_Comm _ _ _) (VE_Unit _ _))
(VE_Trans _ _ _ _ (VE_Comm _ _ _) (VE_Unit _ _))
in
(| g', ctxt', star_typing_inversion_l ctxt'_emp_typing, k |) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_qcode_Check_rdrand_support | val va_qcode_Check_rdrand_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_rdrand_support ())) | val va_qcode_Check_rdrand_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_rdrand_support ())) | let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 779,
"start_col": 0,
"start_line": 747
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_mods: Vale.X64.QuickCode.va_mods_t
-> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.Lib.X64.Cpuid.va_code_Check_rdrand_support ()) | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.QuickCode.va_mods_t",
"Vale.X64.QuickCodes.qblock",
"Prims.unit",
"Prims.Cons",
"Vale.X64.Decls.va_code",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_code_Cpuid_Rdrand",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Prims.Nil",
"Vale.X64.Machine_s.precode",
"Vale.X64.Decls.ins",
"Vale.X64.Decls.ocmp",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.va_QSeq",
"Vale.X64.QuickCodes.va_range1",
"Vale.X64.InsBasic.va_quick_Mov64",
"Vale.X64.QuickCodes.va_QBind",
"Vale.X64.InsBasic.va_quick_Cpuid_Rdrand",
"Vale.X64.QuickCodes.va_qPURE",
"Prims.pure_post",
"Prims.l_and",
"Prims.l_True",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Vale.Def.Types_s.iand",
"Prims.op_GreaterThan",
"Prims.op_GreaterThanOrEqual",
"Vale.Arch.TypesNative.lemma_iand_pow2_64",
"Vale.X64.InsBasic.va_quick_And64",
"Vale.X64.QuickCodes.va_QLemma",
"FStar.Pervasives.normalize",
"Prims.squash",
"Vale.Lib.Basic.assert_normalize",
"Vale.X64.InsBasic.va_quick_Shr64",
"Prims.op_LessThanOrEqual",
"Vale.Def.Types_s.ishr",
"Prims.op_Subtraction",
"Vale.Arch.TypesNative.lemma_ishr_pow2_diff64",
"Vale.Arch.TypesNative.lemma_ishr_zero64",
"Vale.X64.QuickCodes.va_QEmpty",
"Vale.X64.QuickCodes.quickCodes",
"Vale.Def.Words_s.nat64",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCode.va_quickCode",
"Vale.Lib.X64.Cpuid.va_code_Check_rdrand_support"
] | [] | false | false | false | false | false | let va_qcode_Check_rdrand_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_rdrand_support ())) =
| (qblock va_mods
(fun (va_s: va_state) ->
let va_old_s:va_state = va_s in
va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ())
(fun (va_s: va_state) _ ->
let va_arg14:Vale.Def.Types_s.nat64 = va_get_reg64 rRcx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 1073741824))
(fun (va_s: va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (1073741824 ==
Prims.pow2 30))
(fun _ ->
(fun (p: prop) -> p) (1073741824 == Prims.pow2 30))
(fun (_: unit) ->
assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 29))
(fun (va_s: va_state) _ ->
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
1
30)
(va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_zero64 29
)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx
)
(va_op_opr64_reg64 rR9))
(va_QEmpty (()))))))))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_wpProof_Check_osxsave_support | val va_wpProof_Check_osxsave_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_osxsave_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_osxsave_support ())
([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx;
va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) | val va_wpProof_Check_osxsave_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_osxsave_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_osxsave_support ())
([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx;
va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) | let va_wpProof_Check_osxsave_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_osxsave_support (va_code_Check_osxsave_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 1086,
"start_col": 0,
"start_line": 1077
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_osxsave_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_osxsave_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_state",
"Prims.unit",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Prims.Nil",
"Prims._assert",
"Vale.X64.Decls.va_state_eq",
"Vale.X64.Decls.va_update_flags",
"Vale.X64.Decls.va_update_reg64",
"Vale.X64.Decls.va_update_ok",
"Vale.X64.Decls.va_lemma_upd_update",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.X64.State.vale_state",
"Vale.Lib.X64.Cpuid.va_lemma_Check_osxsave_support",
"Vale.Lib.X64.Cpuid.va_code_Check_osxsave_support"
] | [] | false | false | false | false | false | let va_wpProof_Check_osxsave_support va_s0 va_k =
| let va_sM, va_f0 = va_lemma_Check_osxsave_support (va_code_Check_osxsave_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
(va_update_flags va_sM
(va_update_reg64 rR9
va_sM
(va_update_reg64 rRdx
va_sM
(va_update_reg64 rRcx
va_sM
(va_update_reg64 rRbx
va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax
])
va_sM
va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_lemma_Check_osxsave_support | val va_lemma_Check_osxsave_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_osxsave_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ va_get_reg64 rRbx va_sM == va_get_reg64
rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | val va_lemma_Check_osxsave_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_osxsave_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ va_get_reg64 rRbx va_sM == va_get_reg64
rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM
(va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))) | let va_lemma_Check_osxsave_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_osxsave_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 1073,
"start_col": 0,
"start_line": 1058
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state
-> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.fuel",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Vale.X64.Decls.va_fuel",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.QuickCode.va_Mod_ok",
"Prims.Nil",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.list",
"Vale.X64.QuickCode.__proj__QProc__item__mods",
"Vale.Lib.X64.Cpuid.va_code_Check_osxsave_support",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.tuple3",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCodes.va_wp_sound_code_norm",
"Prims.l_and",
"Vale.X64.QuickCodes.label",
"Vale.X64.QuickCodes.va_range1",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Prims.l_imp",
"Prims.l_not",
"Prims.int",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.CPU_Features_s.osxsave_enabled",
"Vale.Def.Types_s.nat64",
"Vale.X64.QuickCode.quickCode",
"Vale.Lib.X64.Cpuid.va_qcode_Check_osxsave_support"
] | [] | false | false | false | false | false | let va_lemma_Check_osxsave_support va_b0 va_s0 =
| let va_mods:va_mods_t =
[
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
]
in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let va_sM, va_fM, va_g =
va_wp_sound_code_norm (va_code_Check_osxsave_support ())
va_qc
va_s0
(fun va_s0 va_sM va_g ->
let () = va_g in
label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0))
in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
])
va_sM
va_s0;
(va_sM, va_fM) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_wpProof_Check_avx_xcr0_support | val va_wpProof_Check_avx_xcr0_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_avx_xcr0_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_avx_xcr0_support ())
([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM,
va_f0, va_g)))) | val va_wpProof_Check_avx_xcr0_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_avx_xcr0_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_avx_xcr0_support ())
([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM,
va_f0, va_g)))) | let va_wpProof_Check_avx_xcr0_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_xcr0_support (va_code_Check_avx_xcr0_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rRdx va_sM (va_update_reg64
rRcx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax])
va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 1179,
"start_col": 0,
"start_line": 1171
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_osxsave_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_osxsave_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_osxsave_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_osxsave_support (va_code_Check_osxsave_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
4)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_xcr0_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx_xcr0_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 358 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 359 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx ()) (fun (va_s:va_state) _ -> let (va_arg19:Vale.Def.Types_s.nat64) =
va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 360 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg19 1) (let
(va_arg18:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 361 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg18 2) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 362 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 364 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 366 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 367 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4 == Prims.pow2 2)) (fun _ -> (fun (p:prop) -> p) (4 ==
Prims.pow2 2)) (fun (_:unit) -> assert_normalize (4 == Prims.pow2 2)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 369 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 370 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 2) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 371 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 373 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg17:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg16:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 374 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg16 va_arg17 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 375 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QEmpty
(())))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_xcr0_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok] in
let va_qc = va_qcode_Check_avx_xcr0_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_xcr0_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 349 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 356 column 30 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_xcr0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_state",
"Prims.unit",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRax",
"Prims.Nil",
"Prims._assert",
"Vale.X64.Decls.va_state_eq",
"Vale.X64.Decls.va_update_flags",
"Vale.X64.Decls.va_update_reg64",
"Vale.X64.Decls.va_update_ok",
"Vale.X64.Decls.va_lemma_upd_update",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.X64.State.vale_state",
"Vale.Lib.X64.Cpuid.va_lemma_Check_avx_xcr0_support",
"Vale.Lib.X64.Cpuid.va_code_Check_avx_xcr0_support"
] | [] | false | false | false | false | false | let va_wpProof_Check_avx_xcr0_support va_s0 va_k =
| let va_sM, va_f0 = va_lemma_Check_avx_xcr0_support (va_code_Check_avx_xcr0_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
(va_update_flags va_sM
(va_update_reg64 rRdx
va_sM
(va_update_reg64 rRcx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))
);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax])
va_sM
va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_lemma_Check_avx512_support | val va_lemma_Check_avx512_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_avx512_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ va_get_reg64 rRbx va_sM ==
va_get_reg64 rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM
(va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM
(va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))))))) | val va_lemma_Check_avx512_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_avx512_support ()) va_s0 /\ va_get_ok va_s0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ va_get_reg64 rRbx va_sM ==
va_get_reg64 rRbx va_s0 /\ va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM
(va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM
(va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))))))) | let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 981,
"start_col": 0,
"start_line": 965
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state
-> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.fuel",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Vale.X64.Decls.va_fuel",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rR11",
"Vale.X64.Machine_s.rR10",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.QuickCode.va_Mod_ok",
"Prims.Nil",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.list",
"Vale.X64.QuickCode.__proj__QProc__item__mods",
"Vale.Lib.X64.Cpuid.va_code_Check_avx512_support",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.tuple3",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCodes.va_wp_sound_code_norm",
"Prims.l_and",
"Vale.X64.QuickCodes.label",
"Vale.X64.QuickCodes.va_range1",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Prims.l_imp",
"Prims.l_not",
"Prims.int",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.CPU_Features_s.avx512_cpuid_enabled",
"Vale.Def.Types_s.nat64",
"Vale.X64.QuickCode.quickCode",
"Vale.Lib.X64.Cpuid.va_qcode_Check_avx512_support"
] | [] | false | false | false | false | false | let va_lemma_Check_avx512_support va_b0 va_s0 =
| let va_mods:va_mods_t =
[
va_Mod_flags;
va_Mod_reg64 rR11;
va_Mod_reg64 rR10;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
]
in
let va_qc = va_qcode_Check_avx512_support va_mods in
let va_sM, va_fM, va_g =
va_wp_sound_code_norm (va_code_Check_avx512_support ())
va_qc
va_s0
(fun va_s0 va_sM va_g ->
let () = va_g in
label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0))
in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rR11;
va_Mod_reg64 rR10;
va_Mod_reg64 rR9;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx;
va_Mod_reg64 rRax;
va_Mod_ok
])
va_sM
va_s0;
(va_sM, va_fM) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_lemma_Check_avx_xcr0_support | val va_lemma_Check_avx_xcr0_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_avx_xcr0_support ()) va_s0 /\ va_get_ok va_s0 /\
osxsave_enabled))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> avx_xcr0) /\ va_state_eq va_sM (va_update_flags va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))) | val va_lemma_Check_avx_xcr0_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_avx_xcr0_support ()) va_s0 /\ va_get_ok va_s0 /\
osxsave_enabled))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> avx_xcr0) /\ va_state_eq va_sM (va_update_flags va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))) | let va_lemma_Check_avx_xcr0_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok] in
let va_qc = va_qcode_Check_avx_xcr0_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_xcr0_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 349 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 356 column 30 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_xcr0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 1167,
"start_col": 0,
"start_line": 1154
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_osxsave_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_osxsave_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_osxsave_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_osxsave_support (va_code_Check_osxsave_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
4)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_xcr0_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx_xcr0_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 358 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 359 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx ()) (fun (va_s:va_state) _ -> let (va_arg19:Vale.Def.Types_s.nat64) =
va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 360 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg19 1) (let
(va_arg18:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 361 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg18 2) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 362 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 364 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 366 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 367 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4 == Prims.pow2 2)) (fun _ -> (fun (p:prop) -> p) (4 ==
Prims.pow2 2)) (fun (_:unit) -> assert_normalize (4 == Prims.pow2 2)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 369 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 370 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 2) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 371 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 373 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg17:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg16:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 374 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg16 va_arg17 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 375 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QEmpty
(()))))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state
-> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.fuel",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Vale.X64.Decls.va_fuel",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.QuickCode.va_Mod_ok",
"Prims.Nil",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.list",
"Vale.X64.QuickCode.__proj__QProc__item__mods",
"Vale.Lib.X64.Cpuid.va_code_Check_avx_xcr0_support",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.tuple3",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCodes.va_wp_sound_code_norm",
"Prims.l_and",
"Vale.X64.QuickCodes.label",
"Vale.X64.QuickCodes.va_range1",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Prims.l_imp",
"Prims.l_not",
"Prims.int",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.CPU_Features_s.avx_xcr0",
"Vale.X64.QuickCode.quickCode",
"Vale.Lib.X64.Cpuid.va_qcode_Check_avx_xcr0_support"
] | [] | false | false | false | false | false | let va_lemma_Check_avx_xcr0_support va_b0 va_s0 =
| let va_mods:va_mods_t =
[va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax; va_Mod_ok]
in
let va_qc = va_qcode_Check_avx_xcr0_support va_mods in
let va_sM, va_fM, va_g =
va_wp_sound_code_norm (va_code_Check_avx_xcr0_support ())
va_qc
va_s0
(fun va_s0 va_sM va_g ->
let () = va_g in
label va_range1
"***** POSTCONDITION NOT MET AT line 349 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 356 column 30 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_xcr0))
in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRax;
va_Mod_ok
])
va_sM
va_s0;
(va_sM, va_fM) | false |
Pulse.Lib.PCM.Fraction.fst | Pulse.Lib.PCM.Fraction.fractional | val fractional : a: Type -> Type | let fractional (a:Type u#a) = option (a & perm) | {
"file_name": "share/steel/examples/pulse/lib/Pulse.Lib.PCM.Fraction.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 47,
"end_line": 7,
"start_col": 0,
"start_line": 7
} | module Pulse.Lib.PCM.Fraction
open FStar.PCM
open FStar.Real
open PulseCore.FractionalPermission | {
"checked_file": "/",
"dependencies": [
"PulseCore.FractionalPermission.fst.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.PCM.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Pulse.Lib.PCM.Fraction.fst"
} | [
{
"abbrev": false,
"full_module": "PulseCore.FractionalPermission",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | a: Type -> Type | Prims.Tot | [
"total"
] | [] | [
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.tuple2",
"PulseCore.FractionalPermission.perm"
] | [] | false | false | false | true | true | let fractional (a: Type u#a) =
| option (a & perm) | false |
|
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_qcode_Check_sse_support | val va_qcode_Check_sse_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_sse_support ())) | val va_qcode_Check_sse_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_sse_support ())) | let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 36,
"end_line": 688,
"start_col": 0,
"start_line": 616
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_mods: Vale.X64.QuickCode.va_mods_t
-> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.Lib.X64.Cpuid.va_code_Check_sse_support ()) | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.QuickCode.va_mods_t",
"Vale.X64.QuickCodes.qblock",
"Prims.unit",
"Prims.Cons",
"Vale.X64.Decls.va_code",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_code_Cpuid_Sse",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Prims.Nil",
"Vale.X64.Machine_s.precode",
"Vale.X64.Decls.ins",
"Vale.X64.Decls.ocmp",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.va_QSeq",
"Vale.X64.QuickCodes.va_range1",
"Vale.X64.InsBasic.va_quick_Mov64",
"Vale.X64.InsBasic.va_quick_Cpuid_Sse",
"Vale.X64.QuickCodes.va_QBind",
"Vale.X64.QuickCodes.va_qPURE",
"Prims.pure_post",
"Prims.l_and",
"Prims.l_True",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Vale.Def.Types_s.iand",
"Prims.op_GreaterThan",
"Prims.op_GreaterThanOrEqual",
"Vale.Arch.TypesNative.lemma_iand_pow2_64",
"Vale.X64.InsBasic.va_quick_And64",
"Vale.X64.QuickCodes.va_QLemma",
"FStar.Pervasives.normalize",
"Prims.squash",
"Vale.Lib.Basic.assert_normalize",
"Vale.X64.InsBasic.va_quick_Shr64",
"Prims.op_LessThanOrEqual",
"Vale.Def.Types_s.ishr",
"Prims.op_Subtraction",
"Vale.Arch.TypesNative.lemma_ishr_pow2_diff64",
"Vale.Arch.TypesNative.lemma_ishr_zero64",
"Prims.l_iff",
"Prims.op_Negation",
"Prims.op_Equality",
"Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64",
"Vale.X64.QuickCodes.va_QEmpty",
"Vale.Def.Words_s.nat64",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.QuickCodes.quickCodes",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCode.va_quickCode",
"Vale.Lib.X64.Cpuid.va_code_Check_sse_support"
] | [] | false | false | false | false | false | let va_qcode_Check_sse_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_sse_support ())) =
| (qblock va_mods
(fun (va_s: va_state) ->
let va_old_s:va_state = va_s in
va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ())
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx))
(fun (va_s: va_state) _ ->
let va_arg35:Vale.Def.Types_s.nat64 = va_get_reg64 rRcx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9)
(let va_arg34:Vale.Def.Types_s.nat64 = va_get_reg64 rRdx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26)
(let va_arg33:Vale.Def.Types_s.nat64 = va_get_reg64 rRax va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 524288))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx)
(va_const_opr64 512))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx)
(va_const_opr64 67108864))
(fun (va_s: va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (512 ==
Prims.pow2 9))
(fun _ ->
(fun (p: prop) -> p) (512 ==
Prims.pow2 9))
(fun (_: unit) ->
assert_normalize (512 == Prims.pow2 9)
)
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (524288 ==
Prims.pow2 19))
(fun _ ->
(fun (p: prop) -> p) (524288 ==
Prims.pow2 19))
(fun (_: unit) ->
assert_normalize (524288 ==
Prims.pow2 19))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (67108864 ==
Prims.pow2 26))
(fun _ ->
(fun (p: prop) -> p) (67108864 ==
Prims.pow2 26))
(fun (_: unit) ->
assert_normalize (67108864 ==
Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64
rRax)
(va_const_shift_amt64 10))
(fun (va_s: va_state) _ ->
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
9
19)
(va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_zero64
10)
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (
va_op_dst_opr64_reg64
rRdx)
(va_const_shift_amt64
17))
(fun
(va_s:
va_state)
_
->
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun
(_:
unit
)
->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
9
26)
(va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun
(_:
unit
)
->
Vale.Arch.TypesNative.lemma_ishr_zero64
17
)
(let
va_arg32:Vale.Def.Types_s.nat64
=
va_get_reg64
rRdx
va_s
in
let
va_arg31:Vale.Def.Types_s.nat64
=
va_get_reg64
rRax
va_s
in
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64
va_arg31
va_arg32
9
)
(let
va_arg30:Vale.Def.Types_s.nat64
=
va_get_reg64
rRax
va_s
in
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_iand_pow2_64
va_arg30
9
)
(
va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_And64
(
va_op_dst_opr64_reg64
rRax
)
(
va_op_opr64_reg64
rRdx
)
)
(
fun
(
va_s:
va_state
)
_
->
let
va_arg29:Vale.Def.Types_s.nat64
=
va_get_reg64
rRcx
va_s
in
let
va_arg28:Vale.Def.Types_s.nat64
=
va_get_reg64
rRax
va_s
in
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64
va_arg28
va_arg29
9
)
(
va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_And64
(
va_op_dst_opr64_reg64
rRax
)
(
va_op_opr64_reg64
rRcx
)
)
(
va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_Mov64
(
va_op_dst_opr64_reg64
rRbx
)
(
va_op_opr64_reg64
rR9
)
)
(
va_QEmpty
(
()
)
)
)
)
)
)
))
))))))))))
))))))))))) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_wpProof_Check_avx512_xcr0_support | val va_wpProof_Check_avx512_xcr0_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_avx512_xcr0_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_avx512_xcr0_support ())
([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM,
va_f0, va_g)))) | val va_wpProof_Check_avx512_xcr0_support : va_s0:va_state -> va_k:(va_state -> unit -> Type0)
-> Ghost (va_state & va_fuel & unit)
(requires (va_t_require va_s0 /\ va_wp_Check_avx512_xcr0_support va_s0 va_k))
(ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Check_avx512_xcr0_support ())
([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM,
va_f0, va_g)))) | let va_wpProof_Check_avx512_xcr0_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_xcr0_support (va_code_Check_avx512_xcr0_support ())
va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rRdx va_sM (va_update_reg64
rRcx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax])
va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 1307,
"start_col": 0,
"start_line": 1298
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_osxsave_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_osxsave_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_osxsave_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_osxsave_support (va_code_Check_osxsave_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
4)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_xcr0_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx_xcr0_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 358 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 359 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx ()) (fun (va_s:va_state) _ -> let (va_arg19:Vale.Def.Types_s.nat64) =
va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 360 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg19 1) (let
(va_arg18:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 361 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg18 2) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 362 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 364 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 366 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 367 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4 == Prims.pow2 2)) (fun _ -> (fun (p:prop) -> p) (4 ==
Prims.pow2 2)) (fun (_:unit) -> assert_normalize (4 == Prims.pow2 2)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 369 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 370 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 2) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 371 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 373 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg17:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg16:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 374 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg16 va_arg17 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 375 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QEmpty
(())))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_xcr0_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok] in
let va_qc = va_qcode_Check_avx_xcr0_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_xcr0_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 349 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 356 column 30 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_xcr0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_xcr0_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_xcr0_support (va_code_Check_avx_xcr0_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rRdx va_sM (va_update_reg64
rRcx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax])
va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx512 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
32)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 128)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 2)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRcx) (va_const_shift_amt64 1)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ())))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 128)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 2)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRcx) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_xcr0_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_xcr0_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 389 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 390 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx512 ()) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 392 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 393 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rRax)) (fun (va_s:va_state) _
-> let (va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 395 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 5) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 396 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg32 6) (let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 397 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg31 7) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 399 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 32)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 400 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 401 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 128)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 403 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 404 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (64 == Prims.pow2 6)) (fun _ -> (fun (p:prop) -> p) (64 ==
Prims.pow2 6)) (fun (_:unit) -> assert_normalize (64 == Prims.pow2 6)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 405 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (128 == Prims.pow2 7)) (fun _ -> (fun (p:prop) -> p) (128 ==
Prims.pow2 7)) (fun (_:unit) -> assert_normalize (128 == Prims.pow2 7)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 407 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 2)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 408 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 5 7) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 409 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 2) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 411 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRcx) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 412 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 5 6) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 413 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 415 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg29 va_arg30 5) (let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 416 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg28 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 417 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg27:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg26:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 418 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg26 va_arg27 5) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 419 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QEmpty
(())))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_xcr0_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_xcr0_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_xcr0_support ()) va_qc
va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 379 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 387 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_xcr0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0)
-> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_state",
"Prims.unit",
"Vale.X64.Decls.va_fuel",
"FStar.Pervasives.Native.Mktuple3",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRax",
"Prims.Nil",
"Prims._assert",
"Vale.X64.Decls.va_state_eq",
"Vale.X64.Decls.va_update_flags",
"Vale.X64.Decls.va_update_reg64",
"Vale.X64.Decls.va_update_ok",
"Vale.X64.Decls.va_lemma_upd_update",
"FStar.Pervasives.Native.tuple3",
"FStar.Pervasives.Native.tuple2",
"Vale.X64.State.vale_state",
"Vale.Lib.X64.Cpuid.va_lemma_Check_avx512_xcr0_support",
"Vale.Lib.X64.Cpuid.va_code_Check_avx512_xcr0_support"
] | [] | false | false | false | false | false | let va_wpProof_Check_avx512_xcr0_support va_s0 va_k =
| let va_sM, va_f0 =
va_lemma_Check_avx512_xcr0_support (va_code_Check_avx512_xcr0_support ()) va_s0
in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM
(va_update_flags va_sM
(va_update_reg64 rRdx
va_sM
(va_update_reg64 rRcx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))
);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax])
va_sM
va_s0;
let va_g = () in
(va_sM, va_f0, va_g) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_qcode_Check_avx_xcr0_support | val va_qcode_Check_avx_xcr0_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx_xcr0_support ())) | val va_qcode_Check_avx_xcr0_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx_xcr0_support ())) | let va_qcode_Check_avx_xcr0_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx_xcr0_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 358 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 359 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx ()) (fun (va_s:va_state) _ -> let (va_arg19:Vale.Def.Types_s.nat64) =
va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 360 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg19 1) (let
(va_arg18:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 361 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg18 2) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 362 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 364 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 366 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 367 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4 == Prims.pow2 2)) (fun _ -> (fun (p:prop) -> p) (4 ==
Prims.pow2 2)) (fun (_:unit) -> assert_normalize (4 == Prims.pow2 2)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 369 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 370 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 2) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 371 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 373 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg17:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg16:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 374 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg16 va_arg17 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 375 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QEmpty
(()))))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 24,
"end_line": 1151,
"start_col": 0,
"start_line": 1111
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_osxsave_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_osxsave_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_osxsave_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_osxsave_support (va_code_Check_osxsave_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
4)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ())))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_mods: Vale.X64.QuickCode.va_mods_t
-> Vale.X64.QuickCode.va_quickCode Prims.unit
(Vale.Lib.X64.Cpuid.va_code_Check_avx_xcr0_support ()) | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.QuickCode.va_mods_t",
"Vale.X64.QuickCodes.qblock",
"Prims.unit",
"Prims.Cons",
"Vale.X64.Decls.va_code",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.InsBasic.va_code_Xgetbv_Avx",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Prims.Nil",
"Vale.X64.Machine_s.precode",
"Vale.X64.Decls.ins",
"Vale.X64.Decls.ocmp",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.va_QSeq",
"Vale.X64.QuickCodes.va_range1",
"Vale.X64.InsBasic.va_quick_Mov64",
"Vale.X64.QuickCodes.va_QBind",
"Vale.X64.InsBasic.va_quick_Xgetbv_Avx",
"Vale.X64.QuickCodes.va_qPURE",
"Prims.pure_post",
"Prims.l_and",
"Prims.l_True",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Vale.Def.Types_s.iand",
"Prims.op_GreaterThan",
"Prims.op_GreaterThanOrEqual",
"Vale.Arch.TypesNative.lemma_iand_pow2_64",
"Vale.X64.InsBasic.va_quick_And64",
"Vale.X64.QuickCodes.va_QLemma",
"FStar.Pervasives.normalize",
"Prims.squash",
"Vale.Lib.Basic.assert_normalize",
"Vale.X64.InsBasic.va_quick_Shr64",
"Prims.op_LessThanOrEqual",
"Vale.Def.Types_s.ishr",
"Prims.op_Subtraction",
"Vale.Arch.TypesNative.lemma_ishr_pow2_diff64",
"Vale.Arch.TypesNative.lemma_ishr_zero64",
"Prims.l_iff",
"Prims.op_Negation",
"Prims.op_Equality",
"Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64",
"Vale.X64.QuickCodes.va_QEmpty",
"Vale.Def.Words_s.nat64",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.QuickCodes.quickCodes",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCode.va_quickCode",
"Vale.Lib.X64.Cpuid.va_code_Check_avx_xcr0_support"
] | [] | false | false | false | false | false | let va_qcode_Check_avx_xcr0_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx_xcr0_support ())) =
| (qblock va_mods
(fun (va_s: va_state) ->
let va_old_s:va_state = va_s in
va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 358 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 359 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx ())
(fun (va_s: va_state) _ ->
let va_arg19:Vale.Def.Types_s.nat64 = va_get_reg64 rRax va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 360 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg19 1)
(let va_arg18:Vale.Def.Types_s.nat64 = va_get_reg64 rRax va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 361 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg18 2)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 362 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 364 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4))
(fun (va_s: va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 366 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (2 == Prims.pow2 1))
(fun _ -> (fun (p: prop) -> p) (2 == Prims.pow2 1))
(fun (_: unit) -> assert_normalize (2 == Prims.pow2 1))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 367 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (4 == Prims.pow2 2))
(fun _ -> (fun (p: prop) -> p) (4 == Prims.pow2 2))
(fun (_: unit) -> assert_normalize (4 == Prims.pow2 2))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 369 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax)
(va_const_shift_amt64 1))
(fun (va_s: va_state) _ ->
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 370 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
1
2)
(va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 371 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_zero64 1
)
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 373 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx
)
(va_const_opr64 2))
(fun (va_s: va_state) _ ->
let va_arg17:Vale.Def.Types_s.nat64
=
va_get_reg64 rRcx va_s
in
let va_arg16:Vale.Def.Types_s.nat64
=
va_get_reg64 rRax va_s
in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 374 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64
va_arg16
va_arg17
1)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 375 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64
rRax)
(va_op_opr64_reg64 rRcx))
(va_QEmpty (()))))))))))))))))
) | false |
Hacl.Spec.BignumQ.Mul.fst | Hacl.Spec.BignumQ.Mul.low_mul_5 | val low_mul_5:
x:qelem5
-> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (as_nat5 x * as_nat5 y) % pow2 264) | val low_mul_5:
x:qelem5
-> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (as_nat5 x * as_nat5 y) % pow2 264) | let low_mul_5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
let xy00 = mul64_wide_5 x0 y0 in
let xy01 = mul64_wide_5 x0 y1 in
let xy02 = mul64_wide_5 x0 y2 in
let xy03 = mul64_wide_5 x0 y3 in
let xy04 = mul64_wide_5 x0 y4 in
let xy10 = mul64_wide_5 x1 y0 in
let xy11 = mul64_wide_5 x1 y1 in
let xy12 = mul64_wide_5 x1 y2 in
let xy13 = mul64_wide_5 x1 y3 in
let xy20 = mul64_wide_5 x2 y0 in
let xy21 = mul64_wide_5 x2 y1 in
let xy22 = mul64_wide_5 x2 y2 in
let xy30 = mul64_wide_5 x3 y0 in
let xy31 = mul64_wide_5 x3 y1 in
let xy40 = mul64_wide_5 x4 y0 in
assert_norm (pow2 112 < pow2 117);
let (c0, t0) = carry56_wide xy00 in
let (c1, t1) = carry56_wide (add_inner_carry (add2 xy01 xy10) c0) in
let (c2, t2) = carry56_wide (add_inner_carry (add3 xy02 xy11 xy20) c1) in
let (c3, t3) = carry56_wide (add_inner_carry (add4 xy03 xy12 xy21 xy30) c2) in
let t4 = to_u64 (add_inner_carry (add5 xy04 xy13 xy22 xy31 xy40) c3) &. mask40 in
calc (==) {
as_nat5 (t0, t1, t2, t3, t4) <: int;
(==) { }
v t0 + v t1 * pow56 + v t2 * pow112 + v t3 * pow168 + v t4 * pow224;
(==) { }
v xy00 - v c0 * pow2 56 +
(v xy01 + v xy10 + v c0 - v c1 * pow2 56) * pow56 +
(v xy02 + v xy11 + v xy20 + v c1 - v c2 * pow56) * pow112 +
(v xy03 + v xy12 + v xy21 + v xy30 + v c2 - v c3 * pow56) * pow168 +
v t4 * pow224;
(==) { logand_mask (to_u64 (add_inner_carry (add5 xy04 xy13 xy22 xy31 xy40) c3)) mask40 40;
Math.Lemmas.pow2_modulo_modulo_lemma_1 (v (add_inner_carry (add5 xy04 xy13 xy22 xy31 xy40) c3)) 40 64
}
v x0 * v y0 +
(v x0 * v y1 + v x1 * v y0) * pow56 +
(v x0 * v y2 + v x1 * v y1 + v x2 * v y0) * pow112 +
(v x0 * v y3 + v x1 * v y2 + v x2 * v y1 + v x3 * v y0 - v c3 * pow56) * pow168 +
((v x0 * v y4 + v x1 * v y3 + v x2 * v y2 + v x3 * v y1 + v x4 * v y0 + v c3) % pow2 40) * pow224;
};
Lemmas.lemma_mul_5_low_264 (v x0) (v x1) (v x2) (v x3) (v x4) (v y0) (v y1) (v y2) (v y3) (v y4);
(t0, t1, t2, t3, t4) | {
"file_name": "code/ed25519/Hacl.Spec.BignumQ.Mul.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 22,
"end_line": 628,
"start_col": 0,
"start_line": 582
} | module Hacl.Spec.BignumQ.Mul
open FStar.Mul
open Lib.IntTypes
module S = Spec.Ed25519
module Lemmas = Hacl.Spec.BignumQ.Lemmas
include Hacl.Spec.BignumQ.Definitions
#reset-options "--z3rlimit 50 --max_fuel 0 --max_ifuel 0"
inline_for_extraction noextract
let mask56 : x:uint64{v x == pow2 56 - 1} =
assert_norm (pow2 56 - 1 == 0xffffffffffffff);
u64 0xffffffffffffff
inline_for_extraction noextract
let mask40 : x:uint64{v x == pow2 40 - 1} =
assert_norm (pow2 40 - 1 == 0xffffffffff);
u64 0xffffffffff
inline_for_extraction noextract
val make_m: unit -> m:qelem5{qelem_fits5 m (1, 1, 1, 1, 1) /\ as_nat5 m == S.q}
let make_m () =
let m0 = u64 0x12631a5cf5d3ed in
let m1 = u64 0xf9dea2f79cd658 in
let m2 = u64 0x000000000014de in
let m3 = u64 0x00000000000000 in
let m4 = u64 0x00000010000000 in
assert_norm (as_nat5 (m0, m1, m2, m3, m4) == S.q);
(m0, m1, m2, m3, m4)
inline_for_extraction noextract
val make_mu: unit -> m:qelem5{qelem_fits5 m (1, 1, 1, 1, 1) /\ as_nat5 m == pow2 512 / S.q}
let make_mu m =
let m0 = u64 0x9ce5a30a2c131b in
let m1 = u64 0x215d086329a7ed in
let m2 = u64 0xffffffffeb2106 in
let m3 = u64 0xffffffffffffff in
let m4 = u64 0x00000fffffffff in
assert_norm (as_nat5 (m0, m1, m2, m3, m4) == pow2 512 / S.q);
(m0, m1, m2, m3, m4)
inline_for_extraction noextract
val choose:
b:uint64
-> x:qelem5
-> y:qelem5 ->
Pure qelem5
(requires v b == 0 \/ v b == 1)
(ensures fun z -> if v b = 1 then z == x else z == y)
let choose b (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
let mask = b -. u64 1 in
let z0 = x0 ^. (mask &. (x0 ^. y0)) in
Lemmas.lemma_choose_step b x0 y0;
let z1 = x1 ^. (mask &. (x1 ^. y1)) in
Lemmas.lemma_choose_step b x1 y1;
let z2 = x2 ^. (mask &. (x2 ^. y2)) in
Lemmas.lemma_choose_step b x2 y2;
let z3 = x3 ^. (mask &. (x3 ^. y3)) in
Lemmas.lemma_choose_step b x3 y3;
let z4 = x4 ^. (mask &. (x4 ^. y4)) in
Lemmas.lemma_choose_step b x4 y4;
(z0, z1, z2, z3, z4)
inline_for_extraction noextract
val subm_step: x:uint64 -> y:uint64 ->
Pure (uint64 & uint64)
(requires v x < pow56 /\ v y <= pow56)
(ensures fun (b, t) ->
v b <= 1 /\ qelem_fits1 t 1 /\
v x - v y == v t - v b * pow56)
let subm_step x y =
let b = (x -. y) >>. 63ul in
//assert (if v x >= v y then v b == 0 else v b == 1);
let lshift56 = (b <<. 56ul) in
//assert (if v x >= v y then v lshift56 == 0 else v lshift56 == pow56);
//assert (v lshift56 == v b * pow56);
//assert (v ((b <<. 56ul) +! x) == v b * pow56 + v x);
let t = ((b <<. 56ul) +! x) -! y in
b, t
inline_for_extraction noextract
val subm_conditional: x:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
(if as_nat5 x >= S.q then as_nat5 r == as_nat5 x - S.q else as_nat5 r == as_nat5 x))
let subm_conditional (x0, x1, x2, x3, x4) =
let (y0, y1, y2, y3, y4) = make_m () in
let (b0, t0) = subm_step x0 y0 in
assert (v x0 - v y0 == v t0 - v b0 * pow56);
let (b1, t1) = subm_step x1 (y1 +! b0) in
assert (v x1 - v y1 - v b0 == v t1 - v b1 * pow56);
let (b2, t2) = subm_step x2 (y2 +! b1) in
assert (v x2 - v y2 - v b1 == v t2 - v b2 * pow56);
let (b3, t3) = subm_step x3 (y3 +! b2) in
assert (v x3 - v y3 - v b2 == v t3 - v b3 * pow56);
let (b4, t4) = subm_step x4 (y4 +! b3) in
assert (v x4 - v y4 - v b3 == v t4 - v b4 * pow56);
Lemmas.lemma_subm_conditional
(v x0) (v x1) (v x2) (v x3) (v x4)
(v y0) (v y1) (v y2) (v y3) (v y4)
(v b0) (v b1) (v b2) (v b3) (v b4);
assert (
as_nat5 (t0, t1, t2, t3, t4) - v b4 * pow56 * pow224 ==
as_nat5 (x0, x1, x2, x3, x4) - as_nat5 (y0, y1, y2, y3, y4));
//assert_norm (pow56 * pow224 = pow2 280);
//assert (as_nat5 (t0, t1, t2, t3, t4) - v b4 * pow2 280 == as_nat5 (x0, x1, x2, x3, x4) - S.q);
Lemmas.lemma_as_nat5 (x0, x1, x2, x3, x4);
Lemmas.lemma_as_nat5 (t0, t1, t2, t3, t4);
//assert (if v b4 = 0 then as_nat5 (x0, x1, x2, x3, x4) >= S.q else as_nat5 (x0, x1, x2, x3, x4) < S.q);
assert (if as_nat5 (x0, x1, x2, x3, x4) >= S.q then v b4 == 0 else v b4 == 1);
let (z0, z1, z2, z3, z4) = choose b4 (x0, x1, x2, x3, x4) (t0, t1, t2, t3, t4) in
assert (
if as_nat5 (x0, x1, x2, x3, x4) >= S.q
then as_nat5 (z0, z1, z2, z3, z4) == as_nat5 (t0, t1, t2, t3, t4)
else as_nat5 (z0, z1, z2, z3, z4) == as_nat5 (x0, x1, x2, x3, x4));
assert (
if as_nat5 (x0, x1, x2, x3, x4) >= S.q
then v b4 == 0 /\ as_nat5 (z0, z1, z2, z3, z4) == as_nat5 (t0, t1, t2, t3, t4)
else v b4 == 1 /\ as_nat5 (z0, z1, z2, z3, z4) == as_nat5 (x0, x1, x2, x3, x4));
(z0, z1, z2, z3, z4)
inline_for_extraction noextract
val carry56: x:uint64 ->
Pure (uint64 & uint64)
(requires v x <= pow2 57)
(ensures fun (t, c) ->
v t < pow56 /\ v c <= 2 /\
v x == v c * pow56 + v t)
let carry56 x =
let carry = x >>. 56ul in
FStar.Math.Lemmas.pow2_minus 57 56;
let t = x &. mask56 in
assert_norm (pow2 56 < pow2 64);
mod_mask_lemma x 56ul;
assert (v (mod_mask #U64 #SEC 56ul) == v mask56);
assert (v t == v x % pow2 56);
assert (v x == v carry * pow2 56 + v t);
t, carry
inline_for_extraction noextract
val add_modq5:
x:qelem5
-> y:qelem5
-> Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1) /\
as_nat5 x < S.q /\ as_nat5 y < S.q)
(ensures fun z ->
qelem_fits5 z (1, 1, 1, 1, 1) /\
as_nat5 z == (as_nat5 x + as_nat5 y) % S.q)
let add_modq5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
assert_norm (pow56 - 1 + pow56 - 1 == pow2 57 - 2);
let (t0, c0) = carry56 (x0 +! y0) in
let (t1, c1) = carry56 (x1 +! y1 +! c0) in
let (t2, c2) = carry56 (x2 +! y2 +! c1) in
let (t3, c3) = carry56 (x3 +! y3 +! c2) in
let t4 = x4 +! y4 +! c3 in
assert (as_nat5 (t0, t1, t2, t3, t4) == as_nat5 (x0, x1, x2, x3, x4) + as_nat5 (y0, y1, y2, y3, y4));
let (o0, o1, o2, o3, o4) = subm_conditional (t0, t1, t2, t3, t4) in
Lemmas.lemma_add_modq5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) (t0, t1, t2, t3, t4);
(o0, o1, o2, o3, o4)
inline_for_extraction noextract
val carry56_wide: x:uint128 ->
Pure (uint128 & uint64)
(requires v x < pow2 117)
(ensures fun (c, t) -> v t < pow56 /\ v c < pow2 61 /\
v x - v c * pow56 == v t /\
v c == v x / pow56)
let carry56_wide x =
let carry = x >>. 56ul in
let t = to_u64 x &. mask56 in
assert_norm (pow2 56 < pow2 64);
Math.Lemmas.lemma_div_lt_nat (v x) 117 56;
mod_mask_lemma (to_u64 x) 56ul;
assert (v (mod_mask #U64 #SEC 56ul) == v mask56);
assert (v t == (v x % pow2 64) % pow2 56);
FStar.Math.Lemmas.pow2_modulo_modulo_lemma_1 (v x) 56 64;
assert (v t == v x % pow2 56);
assert (v x == v carry * pow2 56 + v t);
carry, t
inline_for_extraction noextract
val mul64_wide_5:
(a:uint64) -> (b:uint64) ->
Pure uint128
(requires qelem_fits1 a 1 /\ qelem_fits1 b 1)
(ensures fun z ->
v z == v a * v b /\
v z <= pow2 112 - pow2 57 + 1 /\
v z < pow2 112)
let mul64_wide_5 a b =
let lemma_smaller (a b:uint64) : Lemma
(requires qelem_fits1 a 1 /\ qelem_fits1 b 1)
(ensures v (mul64_wide a b) < pow2 112)
= if v a = 0 || v b = 0 then () else
calc (<) {
v a * v b <: int;
(<) { Math.Lemmas.lemma_mult_le_left (v a) (v b) (pow2 56) }
v a * pow2 56;
(<) { Math.Lemmas.lemma_mult_le_right (pow2 56) (v a) (pow2 56) }
pow2 56 * pow2 56;
(==) { assert_norm (pow2 56 * pow2 56 == pow2 112) }
pow2 112;
}
in
let lemma_le (a b:uint64) : Lemma
(requires qelem_fits1 a 1 /\ qelem_fits1 b 1)
(ensures v (mul64_wide a b) <= pow2 112 - pow2 57 + 1)
= if v a = 0 || v b = 0 then () else
assert_norm (pow2 112 - pow2 57 + 1 >= 0);
calc (<=) {
v a * v b <: int;
(<=) { Math.Lemmas.lemma_mult_le_left (v a) (v b) (pow2 56 - 1) }
v a * (pow2 56 - 1);
(<=) { Math.Lemmas.lemma_mult_le_right (pow2 56 - 1) (v a) (pow2 56 - 1) }
(pow2 56 - 1) * (pow2 56 - 1);
(==) { assert_norm ((pow2 56 - 1) * (pow2 56 - 1) == pow2 112 - pow2 57 + 1) }
pow2 112 - pow2 57 + 1;
}
in
lemma_le a b;
lemma_smaller a b;
mul64_wide a b
inline_for_extraction noextract
val add2:
(a:uint128) -> (b:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112)
(ensures fun z ->
v z == v a + v b /\
v z <= pow2 116)
let add2 a b =
assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
a +. b
inline_for_extraction noextract
val add3:
(a:uint128) -> (b:uint128) -> (c:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 )
(ensures fun z ->
v z == v a + v b + v c /\
v z <= pow2 116)
let add3 a b c =
assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
Math.Lemmas.small_mod (v a + v b + v c) (pow2 128);
a +. b +. c
inline_for_extraction noextract
val add4:
(a:uint128) -> (b:uint128) -> (c:uint128) -> (d:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 /\ v d < pow2 112)
(ensures fun z ->
v z == v a + v b + v c + v d /\
v z <= pow2 116)
let add4 a b c d =
assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
Math.Lemmas.small_mod (v a + v b + v c) (pow2 128);
Math.Lemmas.small_mod (v a + v b + v c + v d) (pow2 128);
a +. b +. c +. d
inline_for_extraction noextract
val add5:
(a:uint128) -> (b:uint128) -> (c:uint128) -> (d:uint128) -> (e:uint128) ->
Pure uint128
(requires v a < pow2 112 /\ v b < pow2 112 /\ v c < pow2 112 /\ v d < pow2 112 /\ v e < pow2 112)
(ensures fun z ->
v z == v a + v b + v c + v d + v e/\
v z <= pow2 116)
let add5 a b c d e =
assert_norm (pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 + pow2 112 < pow2 128);
assert_norm (pow2 112 + pow2 112 + pow2 112 + pow2 112 + pow2 112 <= pow2 116);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
Math.Lemmas.small_mod (v a + v b + v c) (pow2 128);
Math.Lemmas.small_mod (v a + v b + v c + v d) (pow2 128);
Math.Lemmas.small_mod (v a + v b + v c + v d + v e) (pow2 128);
a +. b +. c +. d +. e
inline_for_extraction noextract
val add_inner_carry:
(a:uint128) -> (b:uint128) ->
Pure uint128
(requires v a <= pow2 116 /\ v b < pow2 61)
(ensures fun z ->
v z == v a + v b /\
v z < pow2 117)
let add_inner_carry a b =
assert_norm (pow2 116 + pow2 61 < pow2 128);
assert_norm (pow2 116 + pow2 61 < pow2 117);
Math.Lemmas.small_mod (v a + v b) (pow2 128);
a +. b
inline_for_extraction noextract
val mul_5:
x:qelem5
-> y:qelem5 ->
Pure qelem_wide5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_wide_fits5 r (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) /\
wide_as_nat5 r == as_nat5 x * as_nat5 y)
let lemma_mult_distr_3 (a b c:nat) (n:nat) : Lemma
((a + b - c * pow2 56) * pow2 n == a * pow2 n + b * pow2 n - c * pow2 (n + 56))
=
Math.Lemmas.distributivity_sub_left (a + b) (c * pow2 56) (pow2 n);
Math.Lemmas.distributivity_add_left a b (pow2 n);
Math.Lemmas.pow2_plus 56 n
#set-options "--z3rlimit 300"
let mul_5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
let xy00 = mul64_wide_5 x0 y0 in
let xy01 = mul64_wide_5 x0 y1 in
let xy02 = mul64_wide_5 x0 y2 in
let xy03 = mul64_wide_5 x0 y3 in
let xy04 = mul64_wide_5 x0 y4 in
let xy10 = mul64_wide_5 x1 y0 in
let xy11 = mul64_wide_5 x1 y1 in
let xy12 = mul64_wide_5 x1 y2 in
let xy13 = mul64_wide_5 x1 y3 in
let xy14 = mul64_wide_5 x1 y4 in
let xy20 = mul64_wide_5 x2 y0 in
let xy21 = mul64_wide_5 x2 y1 in
let xy22 = mul64_wide_5 x2 y2 in
let xy23 = mul64_wide_5 x2 y3 in
let xy24 = mul64_wide_5 x2 y4 in
let xy30 = mul64_wide_5 x3 y0 in
let xy31 = mul64_wide_5 x3 y1 in
let xy32 = mul64_wide_5 x3 y2 in
let xy33 = mul64_wide_5 x3 y3 in
let xy34 = mul64_wide_5 x3 y4 in
let xy40 = mul64_wide_5 x4 y0 in
let xy41 = mul64_wide_5 x4 y1 in
let xy42 = mul64_wide_5 x4 y2 in
let xy43 = mul64_wide_5 x4 y3 in
let xy44 = mul64_wide_5 x4 y4 in
let z0 = xy00 in // < pow2 112
let z1 = add2 xy01 xy10 in // < pow2 113
let z2 = add3 xy02 xy11 xy20 in // < pow2 114
let z3 = add4 xy03 xy12 xy21 xy30 in // < pow2 115
let z4 = add5 xy04 xy13 xy22 xy31 xy40 in // < pow2 116
let z5 = add4 xy14 xy23 xy32 xy41 in
let z6 = add3 xy24 xy33 xy42 in
let z7 = add2 xy34 xy43 in
let z8 = xy44 in
//(z0, z1, z2, z3, z4, z5, z6, z7, z8)
assert_norm (pow2 112 < pow2 117);
assert_norm (pow2 112 <= pow2 116);
let (c0, t0) = carry56_wide z0 in
let (c1, t1) = carry56_wide (add_inner_carry z1 c0) in
let (c2, t2) = carry56_wide (add_inner_carry z2 c1) in
let (c3, t3) = carry56_wide (add_inner_carry z3 c2) in
let (c4, t4) = carry56_wide (add_inner_carry z4 c3) in
let (c5, t5) = carry56_wide (add_inner_carry z5 c4) in
let (c6, t6) = carry56_wide (add_inner_carry z6 c5) in
let (c7, t7) = carry56_wide (add_inner_carry z7 c6) in
let (c8, t8) = carry56_wide (add_inner_carry z8 c7) in
let t9 = to_u64 c8 in
let lemma_t9_fits () : Lemma (v t9 < pow2 56)
= // This proof was built from the bottom. We have as a constraint that v c8 has to be < pow2 112 to satisfy the postcondition.
// We compute each time the maximal value such that this postcondition is satisfied
calc (<) {
v c0;
(<) { Math.Lemmas.lemma_div_lt_nat (v z0) 112 56 }
pow2 56;
};
calc (<) {
v c1;
(<) { assert_norm (2*(pow2 112 - pow2 57 + 1) + pow2 56 <= pow2 113);
Math.Lemmas.lemma_div_lt_nat (v z1 + v c0) 113 56 }
pow2 57;
};
calc (<) {
v c2;
(<) { assert_norm (3*(pow2 112 - pow2 57 + 1) + pow2 57 <= pow2 114);
Math.Lemmas.lemma_div_lt_nat (v z2 + v c1) 114 56 }
pow2 58;
};
calc (<=) {
v c3;
(<=) { assert_norm (4*(pow2 112 - pow2 57 + 1) + pow2 58 <= 31153781151208965410895007785680895);
assert_norm (31153781151208965410895007785680895 / pow56 == 432345564227567610);
Math.Lemmas.lemma_div_le (v z3 + v c2) 31153781151208965410895007785680895 (pow2 56) }
432345564227567610;
};
calc (<=) {
v c4;
(<=) { assert_norm (5*(pow2 112 - pow2 57 + 1) + 432345564227567610 <= 25961484292674137854422105494388735); // (pow2 59 - 2) * pow56
assert_norm (25961484292674137854422105494388735 / pow56 == 360287970189639675);
Math.Lemmas.lemma_div_le (v z4 + v c3) 25961484292674137854422105494388735 (pow2 56) }
360287970189639675;
};
calc (<=) {
v c5;
(<=) { assert_norm (4*(pow2 112 - pow2 57 + 1) + 360287970189639675 <= 20769187434139310297949203203096575);
Math.Lemmas.lemma_div_le (v z5 + v c4) 20769187434139310297949203203096575 (pow2 56);
assert_norm (20769187434139310297949203203096575 / pow2 56 == pow2 58 - 4) }
pow2 58 - 4;
};
calc (<=) {
v c6;
(<=) { assert_norm (3*(pow2 112 - pow2 57 + 1) + pow2 58 - 4 <= 15576890575604482741476300911804415);
Math.Lemmas.lemma_div_le (v z6 + v c5) 15576890575604482741476300911804415 (pow2 56);
assert_norm (15576890575604482741476300911804415 / pow2 56 == 216172782113783805) }
216172782113783805;
};
calc (<=) {
v c7;
(<=) { assert_norm (2*(pow2 112 - pow2 57 + 1) + 216172782113783805 <= 10384593717069655185003398620512255); // (pow2 57 - 1) * pow2 56 - 1
Math.Lemmas.lemma_div_le (v z7 + v c6) 10384593717069655185003398620512255 (pow2 56);
assert_norm (10384593717069655185003398620512255 / pow2 56 == pow2 57 - 2) }
pow2 57 - 2;
};
calc (<) {
v c8;
(<) { Math.Lemmas.lemma_div_lt_nat (v z8 + v c7) 112 56 }
pow2 56;
};
assert_norm (pow2 56 < pow2 64);
Math.Lemmas.small_mod (v c8) (pow2 64)
in
lemma_t9_fits();
calc (==) {
wide_as_nat5 (t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) <: int;
(==) { }
v t0 + v t1 * pow56 + v t2 * pow112 + v t3 * pow168 + v t4 * pow224 +
v t5 * pow280 + v t6 * pow336 + v t7 * pow392 + v t8 * pow448 + v t9 * pow504;
(==) { assert_norm (pow2 61 < pow2 64);
Math.Lemmas.small_mod (v c8) (pow2 64)
}
v z0 - v c0 * pow2 56 +
(v z1 + v c0 - v c1 * pow2 56) * pow56 +
(v z2 + v c1 - v c2 * pow2 56) * pow112 +
(v z3 + v c2 - v c3 * pow2 56) * pow168 +
(v z4 + v c3 - v c4 * pow2 56) * pow224 +
(v z5 + v c4 - v c5 * pow2 56) * pow280 +
(v z6 + v c5 - v c6 * pow2 56) * pow336 +
(v z7 + v c6 - v c7 * pow2 56) * pow392 +
(v z8 + v c7 - v c8 * pow2 56) * pow448 +
v c8 * pow504;
(==) {
lemma_mult_distr_3 (v z1) (v c0) (v c1) 56;
lemma_mult_distr_3 (v z2) (v c1) (v c2) 112;
lemma_mult_distr_3 (v z3) (v c2) (v c3) 168;
lemma_mult_distr_3 (v z4) (v c3) (v c4) 224;
lemma_mult_distr_3 (v z5) (v c4) (v c5) 280;
lemma_mult_distr_3 (v z6) (v c5) (v c6) 336;
lemma_mult_distr_3 (v z7) (v c6) (v c7) 392;
lemma_mult_distr_3 (v z8) (v c7) (v c8) 448
}
v z0 +
v z1 * pow56 +
v z2 * pow112 +
v z3 * pow168 +
v z4 * pow224 +
v z5 * pow280 +
v z6 * pow336 +
v z7 * pow392 +
v z8 * pow448;
(==) { calc (==) {
v z1;
(==) { }
v x0 * v y1 + v x1 * v y0;
};
calc (==) {
v z2;
(==) { }
v x0 * v y2 + v x1 * v y1 + v x2 * v y0;
};
calc (==) {
v z3;
(==) { }
v x0 * v y3 + v x1 * v y2 + v x2 * v y1 + v x3 * v y0;
};
calc (==) {
v z4;
(==) { }
v x0 * v y4 + v x1 * v y3 + v x2 * v y2 + v x3 * v y1 + v x4 * v y0;
};
calc (==) {
v z5;
(==) { }
v x1 * v y4 + v x2 * v y3 + v x3 * v y2 + v x4 * v y1;
};
calc (==) {
v z6;
(==) { }
v x2 * v y4 + v x3 * v y3 + v x4 * v y2;
};
calc (==) {
v z7;
(==) { }
v x3 * v y4 + v x4 * v y3;
};
calc (==) {
v z8;
(==) { }
v x4 * v y4;
}
}
v x0 * v y0 +
(v x0 * v y1 + v x1 * v y0) * pow56 +
(v x0 * v y2 + v x1 * v y1 + v x2 * v y0) * pow112 +
(v x0 * v y3 + v x1 * v y2 + v x2 * v y1 + v x3 * v y0) * pow168 +
(v x0 * v y4 + v x1 * v y3 + v x2 * v y2 + v x3 * v y1 + v x4 * v y0) * pow224 +
(v x1 * v y4 + v x2 * v y3 + v x3 * v y2 + v x4 * v y1) * pow280 +
(v x2 * v y4 + v x3 * v y3 + v x4 * v y2) * pow336 +
(v x3 * v y4 + v x4 * v y3) * pow392 +
(v x4 * v y4) * pow448;
(==) { Lemmas.lemma_mul_qelem5 (v x0) (v x1) (v x2) (v x3) (v x4) (v y0) (v y1) (v y2) (v y3) (v y4) }
(v x0 + v x1 * pow2 56 + v x2 * pow2 112 + v x3 * pow2 168 + v x4 * pow2 224) *
(v y0 + v y1 * pow2 56 + v y2 * pow2 112 + v y3 * pow2 168 + v y4 * pow2 224);
};
(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9)
inline_for_extraction noextract
val low_mul_5:
x:qelem5
-> y:qelem5 ->
Pure qelem5
(requires
qelem_fits5 x (1, 1, 1, 1, 1) /\
qelem_fits5 y (1, 1, 1, 1, 1))
(ensures fun r ->
qelem_fits5 r (1, 1, 1, 1, 1) /\
as_nat5 r == (as_nat5 x * as_nat5 y) % pow2 264) | {
"checked_file": "/",
"dependencies": [
"Spec.Ed25519.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fsti.checked",
"Hacl.Spec.BignumQ.Lemmas.fst.checked",
"Hacl.Spec.BignumQ.Definitions.fst.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Spec.BignumQ.Mul.fst"
} | [
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ.Definitions",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Spec.BignumQ.Lemmas",
"short_module": "Lemmas"
},
{
"abbrev": true,
"full_module": "Spec.Ed25519",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Spec.BignumQ",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 300,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | x: Hacl.Spec.BignumQ.Definitions.qelem5 -> y: Hacl.Spec.BignumQ.Definitions.qelem5
-> Prims.Pure Hacl.Spec.BignumQ.Definitions.qelem5 | Prims.Pure | [] | [] | [
"Hacl.Spec.BignumQ.Definitions.qelem5",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.tuple5",
"Lib.IntTypes.int_t",
"Lib.IntTypes.U64",
"Lib.IntTypes.SEC",
"Lib.IntTypes.uint128",
"Lib.IntTypes.uint64",
"FStar.Pervasives.Native.Mktuple5",
"Prims.unit",
"Hacl.Spec.BignumQ.Lemmas.lemma_mul_5_low_264",
"Lib.IntTypes.v",
"FStar.Calc.calc_finish",
"Prims.int",
"Prims.eq2",
"Hacl.Spec.BignumQ.Definitions.as_nat5",
"Prims.op_Addition",
"FStar.Mul.op_Star",
"Hacl.Spec.BignumQ.Definitions.pow56",
"Hacl.Spec.BignumQ.Definitions.pow112",
"Prims.op_Subtraction",
"Lib.IntTypes.U128",
"Hacl.Spec.BignumQ.Definitions.pow168",
"Prims.op_Modulus",
"Prims.pow2",
"Hacl.Spec.BignumQ.Definitions.pow224",
"Prims.Cons",
"FStar.Preorder.relation",
"Prims.Nil",
"FStar.Calc.calc_step",
"FStar.Calc.calc_init",
"FStar.Calc.calc_pack",
"Prims.squash",
"FStar.Math.Lemmas.pow2_modulo_modulo_lemma_1",
"Hacl.Spec.BignumQ.Mul.add_inner_carry",
"Hacl.Spec.BignumQ.Mul.add5",
"Lib.IntTypes.logand_mask",
"Lib.IntTypes.to_u64",
"Hacl.Spec.BignumQ.Mul.mask40",
"Lib.IntTypes.op_Amp_Dot",
"FStar.Pervasives.Native.tuple2",
"Hacl.Spec.BignumQ.Mul.carry56_wide",
"Hacl.Spec.BignumQ.Mul.add4",
"Hacl.Spec.BignumQ.Mul.add3",
"Hacl.Spec.BignumQ.Mul.add2",
"FStar.Pervasives.assert_norm",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.BignumQ.Mul.mul64_wide_5"
] | [] | false | false | false | false | false | let low_mul_5 (x0, x1, x2, x3, x4) (y0, y1, y2, y3, y4) =
| let xy00 = mul64_wide_5 x0 y0 in
let xy01 = mul64_wide_5 x0 y1 in
let xy02 = mul64_wide_5 x0 y2 in
let xy03 = mul64_wide_5 x0 y3 in
let xy04 = mul64_wide_5 x0 y4 in
let xy10 = mul64_wide_5 x1 y0 in
let xy11 = mul64_wide_5 x1 y1 in
let xy12 = mul64_wide_5 x1 y2 in
let xy13 = mul64_wide_5 x1 y3 in
let xy20 = mul64_wide_5 x2 y0 in
let xy21 = mul64_wide_5 x2 y1 in
let xy22 = mul64_wide_5 x2 y2 in
let xy30 = mul64_wide_5 x3 y0 in
let xy31 = mul64_wide_5 x3 y1 in
let xy40 = mul64_wide_5 x4 y0 in
assert_norm (pow2 112 < pow2 117);
let c0, t0 = carry56_wide xy00 in
let c1, t1 = carry56_wide (add_inner_carry (add2 xy01 xy10) c0) in
let c2, t2 = carry56_wide (add_inner_carry (add3 xy02 xy11 xy20) c1) in
let c3, t3 = carry56_wide (add_inner_carry (add4 xy03 xy12 xy21 xy30) c2) in
let t4 = to_u64 (add_inner_carry (add5 xy04 xy13 xy22 xy31 xy40) c3) &. mask40 in
calc ( == ) {
as_nat5 (t0, t1, t2, t3, t4) <: int;
( == ) { () }
v t0 + v t1 * pow56 + v t2 * pow112 + v t3 * pow168 + v t4 * pow224;
( == ) { () }
v xy00 - v c0 * pow2 56 + (v xy01 + v xy10 + v c0 - v c1 * pow2 56) * pow56 +
(v xy02 + v xy11 + v xy20 + v c1 - v c2 * pow56) * pow112 +
(v xy03 + v xy12 + v xy21 + v xy30 + v c2 - v c3 * pow56) * pow168 +
v t4 * pow224;
( == ) { (logand_mask (to_u64 (add_inner_carry (add5 xy04 xy13 xy22 xy31 xy40) c3)) mask40 40;
Math.Lemmas.pow2_modulo_modulo_lemma_1 (v (add_inner_carry (add5 xy04 xy13 xy22 xy31 xy40) c3))
40
64) }
v x0 * v y0 + (v x0 * v y1 + v x1 * v y0) * pow56 +
(v x0 * v y2 + v x1 * v y1 + v x2 * v y0) * pow112 +
(v x0 * v y3 + v x1 * v y2 + v x2 * v y1 + v x3 * v y0 - v c3 * pow56) * pow168 +
((v x0 * v y4 + v x1 * v y3 + v x2 * v y2 + v x3 * v y1 + v x4 * v y0 + v c3) % pow2 40) * pow224;
};
Lemmas.lemma_mul_5_low_264 (v x0) (v x1) (v x2) (v x3) (v x4) (v y0) (v y1) (v y2) (v y3) (v y4);
(t0, t1, t2, t3, t4) | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_lemma_Check_avx512_xcr0_support | val va_lemma_Check_avx512_xcr0_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_avx512_xcr0_support ()) va_s0 /\ va_get_ok va_s0
/\ osxsave_enabled /\ avx_xcr0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_xcr0) /\ va_state_eq va_sM (va_update_flags va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))) | val va_lemma_Check_avx512_xcr0_support : va_b0:va_code -> va_s0:va_state
-> Ghost (va_state & va_fuel)
(requires (va_require_total va_b0 (va_code_Check_avx512_xcr0_support ()) va_s0 /\ va_get_ok va_s0
/\ osxsave_enabled /\ avx_xcr0))
(ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_xcr0) /\ va_state_eq va_sM (va_update_flags va_sM
(va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))) | let va_lemma_Check_avx512_xcr0_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_xcr0_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_xcr0_support ()) va_qc
va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 379 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 387 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_xcr0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 1294,
"start_col": 0,
"start_line": 1281
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_osxsave_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_osxsave_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_osxsave_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_osxsave_support (va_code_Check_osxsave_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
4)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_xcr0_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx_xcr0_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 358 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 359 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx ()) (fun (va_s:va_state) _ -> let (va_arg19:Vale.Def.Types_s.nat64) =
va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 360 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg19 1) (let
(va_arg18:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 361 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg18 2) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 362 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 364 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 366 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 367 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4 == Prims.pow2 2)) (fun _ -> (fun (p:prop) -> p) (4 ==
Prims.pow2 2)) (fun (_:unit) -> assert_normalize (4 == Prims.pow2 2)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 369 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 370 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 2) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 371 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 373 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg17:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg16:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 374 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg16 va_arg17 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 375 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QEmpty
(())))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_xcr0_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok] in
let va_qc = va_qcode_Check_avx_xcr0_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_xcr0_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 349 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 356 column 30 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_xcr0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_xcr0_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_xcr0_support (va_code_Check_avx_xcr0_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rRdx va_sM (va_update_reg64
rRcx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax])
va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx512 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
32)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 128)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 2)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRcx) (va_const_shift_amt64 1)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ())))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 128)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 2)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRcx) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_xcr0_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_xcr0_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 389 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 390 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx512 ()) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 392 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 393 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rRax)) (fun (va_s:va_state) _
-> let (va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 395 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 5) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 396 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg32 6) (let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 397 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg31 7) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 399 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 32)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 400 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 401 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 128)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 403 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 404 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (64 == Prims.pow2 6)) (fun _ -> (fun (p:prop) -> p) (64 ==
Prims.pow2 6)) (fun (_:unit) -> assert_normalize (64 == Prims.pow2 6)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 405 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (128 == Prims.pow2 7)) (fun _ -> (fun (p:prop) -> p) (128 ==
Prims.pow2 7)) (fun (_:unit) -> assert_normalize (128 == Prims.pow2 7)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 407 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 2)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 408 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 5 7) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 409 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 2) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 411 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRcx) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 412 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 5 6) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 413 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 415 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg29 va_arg30 5) (let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 416 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg28 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 417 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg27:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg26:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 418 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg26 va_arg27 5) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 419 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QEmpty
(()))))))))))))))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state
-> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) | Prims.Ghost | [] | [] | [
"Vale.X64.Decls.va_code",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.fuel",
"Prims.unit",
"FStar.Pervasives.Native.Mktuple2",
"Vale.X64.Decls.va_fuel",
"Vale.X64.QuickCode.va_lemma_norm_mods",
"Prims.Cons",
"Vale.X64.QuickCode.mod_t",
"Vale.X64.QuickCode.va_Mod_flags",
"Vale.X64.QuickCode.va_Mod_reg64",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.QuickCode.va_Mod_ok",
"Prims.Nil",
"FStar.Pervasives.assert_norm",
"Prims.eq2",
"Prims.list",
"Vale.X64.QuickCode.__proj__QProc__item__mods",
"Vale.Lib.X64.Cpuid.va_code_Check_avx512_xcr0_support",
"FStar.Pervasives.Native.tuple2",
"FStar.Pervasives.Native.tuple3",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCodes.va_wp_sound_code_norm",
"Prims.l_and",
"Vale.X64.QuickCodes.label",
"Vale.X64.QuickCodes.va_range1",
"Prims.b2t",
"Vale.X64.Decls.va_get_ok",
"Prims.l_imp",
"Prims.l_not",
"Prims.int",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.CPU_Features_s.avx512_xcr0",
"Vale.X64.QuickCode.quickCode",
"Vale.Lib.X64.Cpuid.va_qcode_Check_avx512_xcr0_support"
] | [] | false | false | false | false | false | let va_lemma_Check_avx512_xcr0_support va_b0 va_s0 =
| let va_mods:va_mods_t =
[va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax; va_Mod_ok]
in
let va_qc = va_qcode_Check_avx512_xcr0_support va_mods in
let va_sM, va_fM, va_g =
va_wp_sound_code_norm (va_code_Check_avx512_xcr0_support ())
va_qc
va_s0
(fun va_s0 va_sM va_g ->
let () = va_g in
label va_range1
"***** POSTCONDITION NOT MET AT line 379 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\
label va_range1
"***** POSTCONDITION NOT MET AT line 387 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_xcr0))
in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([
va_Mod_flags;
va_Mod_reg64 rRdx;
va_Mod_reg64 rRcx;
va_Mod_reg64 rRax;
va_Mod_ok
])
va_sM
va_s0;
(va_sM, va_fM) | false |
Pulse.Lib.PCM.Fraction.fst | Pulse.Lib.PCM.Fraction.compose | val compose (#a: _) (f0: fractional a) (f1: fractional a {composable f0 f1}) : fractional a | val compose (#a: _) (f0: fractional a) (f1: fractional a {composable f0 f1}) : fractional a | let compose #a (f0:fractional a) (f1:fractional a{composable f0 f1}) : fractional a =
match f0, f1 with
| None, f
| f, None -> f
| Some (x0, p0), Some (_, p1) -> Some (x0, sum_perm p0 p1) | {
"file_name": "share/steel/examples/pulse/lib/Pulse.Lib.PCM.Fraction.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 60,
"end_line": 18,
"start_col": 0,
"start_line": 14
} | module Pulse.Lib.PCM.Fraction
open FStar.PCM
open FStar.Real
open PulseCore.FractionalPermission
(* Lifted from Steel.PCMFrac *)
let fractional (a:Type u#a) = option (a & perm)
let composable #a : symrel (fractional a) =
fun (f0 f1:fractional a) ->
match f0, f1 with
| None, _
| _, None -> True | {
"checked_file": "/",
"dependencies": [
"PulseCore.FractionalPermission.fst.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.PCM.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Pulse.Lib.PCM.Fraction.fst"
} | [
{
"abbrev": false,
"full_module": "PulseCore.FractionalPermission",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
f0: Pulse.Lib.PCM.Fraction.fractional a ->
f1: Pulse.Lib.PCM.Fraction.fractional a {Pulse.Lib.PCM.Fraction.composable f0 f1}
-> Pulse.Lib.PCM.Fraction.fractional a | Prims.Tot | [
"total"
] | [] | [
"Pulse.Lib.PCM.Fraction.fractional",
"Pulse.Lib.PCM.Fraction.composable",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.tuple2",
"PulseCore.FractionalPermission.perm",
"FStar.Pervasives.Native.Some",
"PulseCore.FractionalPermission.sum_perm"
] | [] | false | false | false | false | false | let compose #a (f0: fractional a) (f1: fractional a {composable f0 f1}) : fractional a =
| match f0, f1 with
| None, f | f, None -> f
| Some (x0, p0), Some (_, p1) -> Some (x0, sum_perm p0 p1) | false |
Pulse.Lib.PCM.Fraction.fst | Pulse.Lib.PCM.Fraction.mk_frame_preserving_upd | val mk_frame_preserving_upd (#a: Type) (v0: Ghost.erased a) (v1: a)
: Tot (frame_preserving_upd pcm_frac (Some (Ghost.reveal v0, full_perm)) (Some (v1, full_perm))) | val mk_frame_preserving_upd (#a: Type) (v0: Ghost.erased a) (v1: a)
: Tot (frame_preserving_upd pcm_frac (Some (Ghost.reveal v0, full_perm)) (Some (v1, full_perm))) | let mk_frame_preserving_upd
(#a: Type)
(v0: Ghost.erased a)
(v1: a)
: Tot (frame_preserving_upd pcm_frac (Some (Ghost.reveal v0, full_perm)) (Some (v1, full_perm)))
= fun _ -> Some (v1, full_perm) | {
"file_name": "share/steel/examples/pulse/lib/Pulse.Lib.PCM.Fraction.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 31,
"end_line": 38,
"start_col": 0,
"start_line": 33
} | module Pulse.Lib.PCM.Fraction
open FStar.PCM
open FStar.Real
open PulseCore.FractionalPermission
(* Lifted from Steel.PCMFrac *)
let fractional (a:Type u#a) = option (a & perm)
let composable #a : symrel (fractional a) =
fun (f0 f1:fractional a) ->
match f0, f1 with
| None, _
| _, None -> True
| Some (x0, p0), Some (x1, p1) -> x0==x1 /\ (sum_perm p0 p1).v <=. one
let compose #a (f0:fractional a) (f1:fractional a{composable f0 f1}) : fractional a =
match f0, f1 with
| None, f
| f, None -> f
| Some (x0, p0), Some (_, p1) -> Some (x0, sum_perm p0 p1)
let pcm_frac #a : pcm (fractional a) = {
p = {
composable = composable;
op = compose;
one = None
};
comm = (fun _ _ -> ());
assoc = (fun _ _ _ -> ());
assoc_r = (fun _ _ _ -> ());
is_unit = (fun _ -> ());
refine = (fun _ -> True)
} | {
"checked_file": "/",
"dependencies": [
"PulseCore.FractionalPermission.fst.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.PCM.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Pulse.Lib.PCM.Fraction.fst"
} | [
{
"abbrev": false,
"full_module": "PulseCore.FractionalPermission",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | v0: FStar.Ghost.erased a -> v1: a
-> FStar.PCM.frame_preserving_upd Pulse.Lib.PCM.Fraction.pcm_frac
(FStar.Pervasives.Native.Some
(FStar.Ghost.reveal v0,
PulseCore.FractionalPermission.full_perm))
(FStar.Pervasives.Native.Some (v1, PulseCore.FractionalPermission.full_perm)) | Prims.Tot | [
"total"
] | [] | [
"FStar.Ghost.erased",
"Pulse.Lib.PCM.Fraction.fractional",
"Prims.l_and",
"FStar.PCM.__proj__Mkpcm__item__refine",
"Pulse.Lib.PCM.Fraction.pcm_frac",
"FStar.PCM.compatible",
"FStar.Pervasives.Native.Some",
"FStar.Pervasives.Native.tuple2",
"PulseCore.FractionalPermission.perm",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Ghost.reveal",
"PulseCore.FractionalPermission.full_perm",
"Prims.l_Forall",
"FStar.PCM.composable",
"Prims.l_imp",
"Prims.eq2",
"FStar.PCM.op",
"FStar.PCM.frame_preserving_upd"
] | [] | false | false | false | false | false | let mk_frame_preserving_upd (#a: Type) (v0: Ghost.erased a) (v1: a)
: Tot (frame_preserving_upd pcm_frac (Some (Ghost.reveal v0, full_perm)) (Some (v1, full_perm))) =
| fun _ -> Some (v1, full_perm) | false |
Pulse.Lib.PCM.Fraction.fst | Pulse.Lib.PCM.Fraction.full_values_compatible | val full_values_compatible (#a: Type u#a) (x: a)
: Lemma (compatible pcm_frac (Some (x, full_perm)) (Some (x, full_perm))) | val full_values_compatible (#a: Type u#a) (x: a)
: Lemma (compatible pcm_frac (Some (x, full_perm)) (Some (x, full_perm))) | let full_values_compatible (#a:Type u#a) (x:a)
: Lemma (compatible pcm_frac (Some (x, full_perm)) (Some (x, full_perm)))
= let v = Some (x, full_perm) in
assert (FStar.PCM.composable pcm_frac v None) | {
"file_name": "share/steel/examples/pulse/lib/Pulse.Lib.PCM.Fraction.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 47,
"end_line": 51,
"start_col": 0,
"start_line": 48
} | module Pulse.Lib.PCM.Fraction
open FStar.PCM
open FStar.Real
open PulseCore.FractionalPermission
(* Lifted from Steel.PCMFrac *)
let fractional (a:Type u#a) = option (a & perm)
let composable #a : symrel (fractional a) =
fun (f0 f1:fractional a) ->
match f0, f1 with
| None, _
| _, None -> True
| Some (x0, p0), Some (x1, p1) -> x0==x1 /\ (sum_perm p0 p1).v <=. one
let compose #a (f0:fractional a) (f1:fractional a{composable f0 f1}) : fractional a =
match f0, f1 with
| None, f
| f, None -> f
| Some (x0, p0), Some (_, p1) -> Some (x0, sum_perm p0 p1)
let pcm_frac #a : pcm (fractional a) = {
p = {
composable = composable;
op = compose;
one = None
};
comm = (fun _ _ -> ());
assoc = (fun _ _ _ -> ());
assoc_r = (fun _ _ _ -> ());
is_unit = (fun _ -> ());
refine = (fun _ -> True)
}
let mk_frame_preserving_upd
(#a: Type)
(v0: Ghost.erased a)
(v1: a)
: Tot (frame_preserving_upd pcm_frac (Some (Ghost.reveal v0, full_perm)) (Some (v1, full_perm)))
= fun _ -> Some (v1, full_perm)
let mk_frame_preserving_upd_none
(#a: Type)
(v0: Ghost.erased a)
: Tot (frame_preserving_upd pcm_frac (Some (Ghost.reveal v0, full_perm)) None)
= fun _ -> None
let perm_ok p : prop = (p.v <=. one == true) | {
"checked_file": "/",
"dependencies": [
"PulseCore.FractionalPermission.fst.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.PCM.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Pulse.Lib.PCM.Fraction.fst"
} | [
{
"abbrev": false,
"full_module": "PulseCore.FractionalPermission",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | x: a
-> FStar.Pervasives.Lemma
(ensures
FStar.PCM.compatible Pulse.Lib.PCM.Fraction.pcm_frac
(FStar.Pervasives.Native.Some (x, PulseCore.FractionalPermission.full_perm))
(FStar.Pervasives.Native.Some (x, PulseCore.FractionalPermission.full_perm))) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Prims._assert",
"FStar.PCM.composable",
"Pulse.Lib.PCM.Fraction.fractional",
"Pulse.Lib.PCM.Fraction.pcm_frac",
"FStar.Pervasives.Native.None",
"FStar.Pervasives.Native.tuple2",
"PulseCore.FractionalPermission.perm",
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.Some",
"FStar.Pervasives.Native.Mktuple2",
"PulseCore.FractionalPermission.full_perm",
"Prims.unit",
"Prims.l_True",
"Prims.squash",
"FStar.PCM.compatible",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let full_values_compatible (#a: Type u#a) (x: a)
: Lemma (compatible pcm_frac (Some (x, full_perm)) (Some (x, full_perm))) =
| let v = Some (x, full_perm) in
assert (FStar.PCM.composable pcm_frac v None) | false |
Pulse.Lib.PCM.Fraction.fst | Pulse.Lib.PCM.Fraction.composable | val composable (#a: _) : symrel (fractional a) | val composable (#a: _) : symrel (fractional a) | let composable #a : symrel (fractional a) =
fun (f0 f1:fractional a) ->
match f0, f1 with
| None, _
| _, None -> True
| Some (x0, p0), Some (x1, p1) -> x0==x1 /\ (sum_perm p0 p1).v <=. one | {
"file_name": "share/steel/examples/pulse/lib/Pulse.Lib.PCM.Fraction.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 74,
"end_line": 13,
"start_col": 0,
"start_line": 8
} | module Pulse.Lib.PCM.Fraction
open FStar.PCM
open FStar.Real
open PulseCore.FractionalPermission
(* Lifted from Steel.PCMFrac *) | {
"checked_file": "/",
"dependencies": [
"PulseCore.FractionalPermission.fst.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.PCM.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Pulse.Lib.PCM.Fraction.fst"
} | [
{
"abbrev": false,
"full_module": "PulseCore.FractionalPermission",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | FStar.PCM.symrel (Pulse.Lib.PCM.Fraction.fractional a) | Prims.Tot | [
"total"
] | [] | [
"Pulse.Lib.PCM.Fraction.fractional",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Pervasives.Native.option",
"FStar.Pervasives.Native.tuple2",
"PulseCore.FractionalPermission.perm",
"Prims.l_True",
"Prims.l_and",
"Prims.eq2",
"Prims.b2t",
"FStar.Real.op_Less_Equals_Dot",
"PulseCore.FractionalPermission.__proj__MkPerm__item__v",
"PulseCore.FractionalPermission.sum_perm",
"FStar.Real.one",
"Prims.prop",
"FStar.PCM.symrel"
] | [] | false | false | false | true | false | let composable #a : symrel (fractional a) =
| fun (f0: fractional a) (f1: fractional a) ->
match f0, f1 with
| None, _ | _, None -> True
| Some (x0, p0), Some (x1, p1) -> x0 == x1 /\ (sum_perm p0 p1).v <=. one | false |
Pulse.Lib.PCM.Fraction.fst | Pulse.Lib.PCM.Fraction.mk_frame_preserving_upd_none | val mk_frame_preserving_upd_none (#a: Type) (v0: Ghost.erased a)
: Tot (frame_preserving_upd pcm_frac (Some (Ghost.reveal v0, full_perm)) None) | val mk_frame_preserving_upd_none (#a: Type) (v0: Ghost.erased a)
: Tot (frame_preserving_upd pcm_frac (Some (Ghost.reveal v0, full_perm)) None) | let mk_frame_preserving_upd_none
(#a: Type)
(v0: Ghost.erased a)
: Tot (frame_preserving_upd pcm_frac (Some (Ghost.reveal v0, full_perm)) None)
= fun _ -> None | {
"file_name": "share/steel/examples/pulse/lib/Pulse.Lib.PCM.Fraction.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 15,
"end_line": 44,
"start_col": 0,
"start_line": 40
} | module Pulse.Lib.PCM.Fraction
open FStar.PCM
open FStar.Real
open PulseCore.FractionalPermission
(* Lifted from Steel.PCMFrac *)
let fractional (a:Type u#a) = option (a & perm)
let composable #a : symrel (fractional a) =
fun (f0 f1:fractional a) ->
match f0, f1 with
| None, _
| _, None -> True
| Some (x0, p0), Some (x1, p1) -> x0==x1 /\ (sum_perm p0 p1).v <=. one
let compose #a (f0:fractional a) (f1:fractional a{composable f0 f1}) : fractional a =
match f0, f1 with
| None, f
| f, None -> f
| Some (x0, p0), Some (_, p1) -> Some (x0, sum_perm p0 p1)
let pcm_frac #a : pcm (fractional a) = {
p = {
composable = composable;
op = compose;
one = None
};
comm = (fun _ _ -> ());
assoc = (fun _ _ _ -> ());
assoc_r = (fun _ _ _ -> ());
is_unit = (fun _ -> ());
refine = (fun _ -> True)
}
let mk_frame_preserving_upd
(#a: Type)
(v0: Ghost.erased a)
(v1: a)
: Tot (frame_preserving_upd pcm_frac (Some (Ghost.reveal v0, full_perm)) (Some (v1, full_perm)))
= fun _ -> Some (v1, full_perm) | {
"checked_file": "/",
"dependencies": [
"PulseCore.FractionalPermission.fst.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.PCM.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Pulse.Lib.PCM.Fraction.fst"
} | [
{
"abbrev": false,
"full_module": "PulseCore.FractionalPermission",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | v0: FStar.Ghost.erased a
-> FStar.PCM.frame_preserving_upd Pulse.Lib.PCM.Fraction.pcm_frac
(FStar.Pervasives.Native.Some
(FStar.Ghost.reveal v0,
PulseCore.FractionalPermission.full_perm))
FStar.Pervasives.Native.None | Prims.Tot | [
"total"
] | [] | [
"FStar.Ghost.erased",
"Pulse.Lib.PCM.Fraction.fractional",
"Prims.l_and",
"FStar.PCM.__proj__Mkpcm__item__refine",
"Pulse.Lib.PCM.Fraction.pcm_frac",
"FStar.PCM.compatible",
"FStar.Pervasives.Native.Some",
"FStar.Pervasives.Native.tuple2",
"PulseCore.FractionalPermission.perm",
"FStar.Pervasives.Native.Mktuple2",
"FStar.Ghost.reveal",
"PulseCore.FractionalPermission.full_perm",
"FStar.Pervasives.Native.None",
"Prims.l_Forall",
"FStar.PCM.composable",
"Prims.l_imp",
"Prims.eq2",
"FStar.PCM.op",
"FStar.PCM.frame_preserving_upd"
] | [] | false | false | false | false | false | let mk_frame_preserving_upd_none (#a: Type) (v0: Ghost.erased a)
: Tot (frame_preserving_upd pcm_frac (Some (Ghost.reveal v0, full_perm)) None) =
| fun _ -> None | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_qcode_Check_avx512_xcr0_support | val va_qcode_Check_avx512_xcr0_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx512_xcr0_support ())) | val va_qcode_Check_avx512_xcr0_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx512_xcr0_support ())) | let va_qcode_Check_avx512_xcr0_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_xcr0_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 389 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 390 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx512 ()) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 392 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 393 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rRax)) (fun (va_s:va_state) _
-> let (va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 395 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 5) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 396 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg32 6) (let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 397 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg31 7) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 399 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 32)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 400 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 401 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 128)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 403 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 404 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (64 == Prims.pow2 6)) (fun _ -> (fun (p:prop) -> p) (64 ==
Prims.pow2 6)) (fun (_:unit) -> assert_normalize (64 == Prims.pow2 6)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 405 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (128 == Prims.pow2 7)) (fun _ -> (fun (p:prop) -> p) (128 ==
Prims.pow2 7)) (fun (_:unit) -> assert_normalize (128 == Prims.pow2 7)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 407 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 2)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 408 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 5 7) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 409 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 2) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 411 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRcx) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 412 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 5 6) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 413 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 415 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg29 va_arg30 5) (let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 416 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg28 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 417 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg27:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg26:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 418 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg26 va_arg27 5) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 419 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QEmpty
(()))))))))))))))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 34,
"end_line": 1278,
"start_col": 0,
"start_line": 1212
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ()))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx512_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx512_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx512_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 265 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 270 column 42 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx512_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 271 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM
va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx512_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx512_support (va_code_Check_avx512_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR11 va_sM (va_update_reg64
rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM
(va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9;
va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_osxsave_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_osxsave_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons
(va_code_Cpuid_Osxsave ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRcx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
134217728)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil
()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_osxsave_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Osxsave ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_osxsave_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_osxsave_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 332 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 334 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 335 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 336 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Osxsave ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 337 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 338 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 339 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 134217728)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 340 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (134217728 == Prims.pow2 27)) (fun _ -> (fun (p:prop) -> p)
(134217728 == Prims.pow2 27)) (fun (_:unit) -> assert_normalize (134217728 == Prims.pow2 27))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 342 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 26)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 343 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 27) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 344 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 26) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 346 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_osxsave_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_osxsave_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_osxsave_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 324 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 329 column 37 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> osxsave_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 330 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_osxsave_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_osxsave_support (va_code_Check_osxsave_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
4)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_xcr0_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx_xcr0_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 358 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 359 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx ()) (fun (va_s:va_state) _ -> let (va_arg19:Vale.Def.Types_s.nat64) =
va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 360 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg19 1) (let
(va_arg18:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 361 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg18 2) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 362 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 364 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 366 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 367 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4 == Prims.pow2 2)) (fun _ -> (fun (p:prop) -> p) (4 ==
Prims.pow2 2)) (fun (_:unit) -> assert_normalize (4 == Prims.pow2 2)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 369 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 370 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 2) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 371 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 373 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg17:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg16:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 374 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg16 va_arg17 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 375 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QEmpty
(())))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_xcr0_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok] in
let va_qc = va_qcode_Check_avx_xcr0_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_xcr0_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 349 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 356 column 30 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_xcr0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax;
va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_xcr0_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_xcr0_support (va_code_Check_avx_xcr0_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rRdx va_sM (va_update_reg64
rRcx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRax])
va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_xcr0_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_xcr0_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Xgetbv_Avx512 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdx)
(va_op_opr64_reg64 rRax)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
32)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 128)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 2)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRcx) (va_const_shift_amt64 1)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CNil ())))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_xcr0_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Xgetbv_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 128)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 2)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRcx) (va_const_shift_amt64 1)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_ttrue ())))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_mods: Vale.X64.QuickCode.va_mods_t
-> Vale.X64.QuickCode.va_quickCode Prims.unit
(Vale.Lib.X64.Cpuid.va_code_Check_avx512_xcr0_support ()) | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.QuickCode.va_mods_t",
"Vale.X64.QuickCodes.qblock",
"Prims.unit",
"Prims.Cons",
"Vale.X64.Decls.va_code",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.InsBasic.va_code_Xgetbv_Avx512",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Machine_s.rRdx",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Prims.Nil",
"Vale.X64.Machine_s.precode",
"Vale.X64.Decls.ins",
"Vale.X64.Decls.ocmp",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.va_QSeq",
"Vale.X64.QuickCodes.va_range1",
"Vale.X64.InsBasic.va_quick_Mov64",
"Vale.X64.InsBasic.va_quick_Xgetbv_Avx512",
"Vale.X64.QuickCodes.va_QBind",
"Vale.X64.QuickCodes.va_qPURE",
"Prims.pure_post",
"Prims.l_and",
"Prims.l_True",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Vale.Def.Types_s.iand",
"Prims.op_GreaterThan",
"Prims.op_GreaterThanOrEqual",
"Vale.Arch.TypesNative.lemma_iand_pow2_64",
"Vale.X64.InsBasic.va_quick_And64",
"Vale.X64.QuickCodes.va_QLemma",
"FStar.Pervasives.normalize",
"Prims.squash",
"Vale.Lib.Basic.assert_normalize",
"Vale.X64.InsBasic.va_quick_Shr64",
"Prims.op_LessThanOrEqual",
"Vale.Def.Types_s.ishr",
"Prims.op_Subtraction",
"Vale.Arch.TypesNative.lemma_ishr_pow2_diff64",
"Vale.Arch.TypesNative.lemma_ishr_zero64",
"Prims.l_iff",
"Prims.op_Negation",
"Prims.op_Equality",
"Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64",
"Vale.X64.QuickCodes.va_QEmpty",
"Vale.Def.Words_s.nat64",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.QuickCodes.quickCodes",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCode.va_quickCode",
"Vale.Lib.X64.Cpuid.va_code_Check_avx512_xcr0_support"
] | [] | false | false | false | false | false | let va_qcode_Check_avx512_xcr0_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx512_xcr0_support ())) =
| (qblock va_mods
(fun (va_s: va_state) ->
let va_old_s:va_state = va_s in
va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 389 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 390 column 18 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Xgetbv_Avx512 ())
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 392 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rRax))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 393 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rRax))
(fun (va_s: va_state) _ ->
let va_arg33:Vale.Def.Types_s.nat64 = va_get_reg64 rRax va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 395 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 5)
(let va_arg32:Vale.Def.Types_s.nat64 = va_get_reg64 rRcx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 396 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg32 6)
(let va_arg31:Vale.Def.Types_s.nat64 = va_get_reg64 rRdx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 397 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg31 7)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 399 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax)
(va_const_opr64 32))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 400 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx)
(va_const_opr64 64))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 401 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx)
(va_const_opr64 128))
(fun (va_s: va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 403 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (32 ==
Prims.pow2 5))
(fun _ ->
(fun (p: prop) -> p) (32 == Prims.pow2 5))
(fun (_: unit) ->
assert_normalize (32 == Prims.pow2 5))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 404 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (64 ==
Prims.pow2 6))
(fun _ ->
(fun (p: prop) -> p) (64 ==
Prims.pow2 6))
(fun (_: unit) ->
assert_normalize (64 == Prims.pow2 6))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 405 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p) (128 ==
Prims.pow2 7))
(fun _ ->
(fun (p: prop) -> p) (128 ==
Prims.pow2 7))
(fun (_: unit) ->
assert_normalize (128 ==
Prims.pow2 7))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 407 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64
rRdx)
(va_const_shift_amt64 2))
(fun (va_s: va_state) _ ->
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 408 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
5
7)
(va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 409 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_ishr_zero64
2)
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 411 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64
rRcx)
(va_const_shift_amt64
1))
(fun
(va_s: va_state)
_
->
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 412 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun
(_: unit)
->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
5
6)
(va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 413 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun
(_:
unit
)
->
Vale.Arch.TypesNative.lemma_ishr_zero64
1)
(let
va_arg30:Vale.Def.Types_s.nat64
=
va_get_reg64
rRdx
va_s
in
let
va_arg29:Vale.Def.Types_s.nat64
=
va_get_reg64
rRax
va_s
in
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 415 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun
(_:
unit
)
->
Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64
va_arg29
va_arg30
5
)
(let
va_arg28:Vale.Def.Types_s.nat64
=
va_get_reg64
rRax
va_s
in
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 416 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_iand_pow2_64
va_arg28
5
)
(va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 417 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_And64
(
va_op_dst_opr64_reg64
rRax
)
(
va_op_opr64_reg64
rRdx
)
)
(
fun
(
va_s:
va_state
)
_
->
let
va_arg27:Vale.Def.Types_s.nat64
=
va_get_reg64
rRcx
va_s
in
let
va_arg26:Vale.Def.Types_s.nat64
=
va_get_reg64
rRax
va_s
in
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 418 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64
va_arg26
va_arg27
5
)
(
va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 419 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_And64
(
va_op_dst_opr64_reg64
rRax
)
(
va_op_opr64_reg64
rRcx
)
)
(
va_QEmpty
(
()
)
)
)
)
))
))))))))))
))))))))))) | false |
Pulse.Lib.PCM.Fraction.fst | Pulse.Lib.PCM.Fraction.pcm_frac | val pcm_frac (#a: _) : pcm (fractional a) | val pcm_frac (#a: _) : pcm (fractional a) | let pcm_frac #a : pcm (fractional a) = {
p = {
composable = composable;
op = compose;
one = None
};
comm = (fun _ _ -> ());
assoc = (fun _ _ _ -> ());
assoc_r = (fun _ _ _ -> ());
is_unit = (fun _ -> ());
refine = (fun _ -> True)
} | {
"file_name": "share/steel/examples/pulse/lib/Pulse.Lib.PCM.Fraction.fst",
"git_rev": "f984200f79bdc452374ae994a5ca837496476c41",
"git_url": "https://github.com/FStarLang/steel.git",
"project_name": "steel"
} | {
"end_col": 1,
"end_line": 31,
"start_col": 0,
"start_line": 20
} | module Pulse.Lib.PCM.Fraction
open FStar.PCM
open FStar.Real
open PulseCore.FractionalPermission
(* Lifted from Steel.PCMFrac *)
let fractional (a:Type u#a) = option (a & perm)
let composable #a : symrel (fractional a) =
fun (f0 f1:fractional a) ->
match f0, f1 with
| None, _
| _, None -> True
| Some (x0, p0), Some (x1, p1) -> x0==x1 /\ (sum_perm p0 p1).v <=. one
let compose #a (f0:fractional a) (f1:fractional a{composable f0 f1}) : fractional a =
match f0, f1 with
| None, f
| f, None -> f
| Some (x0, p0), Some (_, p1) -> Some (x0, sum_perm p0 p1) | {
"checked_file": "/",
"dependencies": [
"PulseCore.FractionalPermission.fst.checked",
"prims.fst.checked",
"FStar.Real.fsti.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.PCM.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Pulse.Lib.PCM.Fraction.fst"
} | [
{
"abbrev": false,
"full_module": "PulseCore.FractionalPermission",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Real",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "Pulse.Lib.PCM",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": true,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | FStar.PCM.pcm (Pulse.Lib.PCM.Fraction.fractional a) | Prims.Tot | [
"total"
] | [] | [
"FStar.PCM.Mkpcm",
"Pulse.Lib.PCM.Fraction.fractional",
"FStar.PCM.Mkpcm'",
"Pulse.Lib.PCM.Fraction.composable",
"Pulse.Lib.PCM.Fraction.compose",
"FStar.Pervasives.Native.None",
"FStar.Pervasives.Native.tuple2",
"PulseCore.FractionalPermission.perm",
"FStar.PCM.__proj__Mkpcm'__item__composable",
"Prims.unit",
"Prims.l_and",
"FStar.PCM.__proj__Mkpcm'__item__op",
"Prims.l_True",
"Prims.prop",
"FStar.PCM.pcm"
] | [] | false | false | false | true | false | let pcm_frac #a : pcm (fractional a) =
| {
p = { composable = composable; op = compose; one = None };
comm = (fun _ _ -> ());
assoc = (fun _ _ _ -> ());
assoc_r = (fun _ _ _ -> ());
is_unit = (fun _ -> ());
refine = (fun _ -> True)
} | false |
Vale.Lib.X64.Cpuid.fst | Vale.Lib.X64.Cpuid.va_qcode_Check_avx512_support | val va_qcode_Check_avx512_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx512_support ())) | val va_qcode_Check_avx512_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx512_support ())) | let va_qcode_Check_avx512_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx512_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ()) (fun (va_s:va_state) _ -> let (va_arg49:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16) (let
(va_arg48:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17) (let
(va_arg47:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30) (let
(va_arg46:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (65536 == Prims.pow2 16)) (fun _ -> (fun (p:prop) -> p) (65536
== Prims.pow2 16)) (fun (_:unit) -> assert_normalize (65536 == Prims.pow2 16)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (131072 == Prims.pow2 17)) (fun _ -> (fun (p:prop) -> p) (131072
== Prims.pow2 17)) (fun (_:unit) -> assert_normalize (131072 == Prims.pow2 17)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2147483648 == Prims.pow2 31)) (fun _ -> (fun (p:prop) -> p)
(2147483648 == Prims.pow2 31)) (fun (_:unit) -> assert_normalize (2147483648 == Prims.pow2 31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 17) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 1) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 14) (let
(va_arg45:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg44:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg44 va_arg45 16) (let
(va_arg43:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg43 16) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 16 31) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 15) (let
(va_arg42:Vale.Def.Types_s.nat64) = va_get_reg64 rR10 va_s in let
(va_arg41:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg41 va_arg42 16) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (fun (va_s:va_state) _
-> let (va_arg40:Vale.Def.Types_s.nat64) = va_get_reg64 rR11 va_s in let
(va_arg39:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg39 va_arg40 16) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))))))))))))) | {
"file_name": "obj/Vale.Lib.X64.Cpuid.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 47,
"end_line": 962,
"start_col": 0,
"start_line": 860
} | module Vale.Lib.X64.Cpuid
open Vale.Def.Types_s
open Vale.Arch.Types
open Vale.X64.Machine_s
open Vale.X64.Memory
open Vale.X64.State
open Vale.X64.Decls
open Vale.X64.InsBasic
open Vale.X64.QuickCode
open Vale.X64.QuickCodes
open Vale.X64.CPU_Features_s
//let pow2_values (u:unit) : Lemma
// (pow2 29 == 0x20000000 /\
// pow2 25 == 0x2000000 /\
// pow2 1 == 0x2)
// =
// assert_norm (pow2 29 == 0x20000000);
// assert_norm (0x2000000 == pow2 25);
// assert_norm (0x2 == pow2 1);
// ()
open Vale.Lib.Basic
//-- Check_aesni_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_aesni_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_AES
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_aesni_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_AES ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_aesni_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_aesni_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 42 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 44 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 45 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 46 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_AES ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 47 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 25) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 48 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 1) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 49 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 50 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 33554432)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 51 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (33554432 == Prims.pow2 25)) (fun _ -> (fun (p:prop) -> p)
(33554432 == Prims.pow2 25)) (fun (_:unit) -> assert_normalize (33554432 == Prims.pow2 25))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 52 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (2 == Prims.pow2 1)) (fun _ -> (fun (p:prop) -> p) (2 ==
Prims.pow2 1)) (fun (_:unit) -> assert_normalize (2 == Prims.pow2 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 54 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 24)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 55 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 25) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 56 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 24) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 58 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 2)) (fun (va_s:va_state) _ -> let
(va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 59 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 1) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 60 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 66 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_aesni_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_aesni_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_aesni_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 34 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 39 column 56 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> aesni_enabled /\ pclmulqdq_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 40 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_aesni_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_aesni_support (va_code_Check_aesni_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sha_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sha_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Sha
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sha_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Sha ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sha_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sha_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 77 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 79 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 80 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 81 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sha ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 82 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 29) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 83 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 536870912)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 84 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (536870912 == Prims.pow2 29)) (fun _ -> (fun (p:prop) -> p)
(536870912 == Prims.pow2 29)) (fun (_:unit) -> assert_normalize (536870912 == Prims.pow2 29))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 85 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 87 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sha_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sha_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sha_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 69 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 74 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sha_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 75 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sha_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sha_support (va_code_Check_sha_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_adx_bmi2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_adx_bmi2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Cpuid_Adx_Bmi2 ()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64
524288)) (va_CCons (va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11))
(va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_adx_bmi2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Adx_Bmi2 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_adx_bmi2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_adx_bmi2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 98 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 100 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 101 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 102 column 19 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Adx_Bmi2 ()) (fun (va_s:va_state) _ -> let (va_arg22:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 103 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg22 8) (let
(va_arg21:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 104 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg21 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 105 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 107 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 109 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (256 == Prims.pow2 8)) (fun _ -> (fun (p:prop) -> p) (256 ==
Prims.pow2 8)) (fun (_:unit) -> assert_normalize (256 == Prims.pow2 8)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 110 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 112 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 11)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 113 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 8 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 114 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 11) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 116 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 256)) (fun (va_s:va_state) _ ->
let (va_arg20:Vale.Def.Types_s.nat64) = va_get_reg64 rRbx va_s in let
(va_arg19:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 117 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg19 va_arg20 8) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 118 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 120 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(()))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_adx_bmi2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_adx_bmi2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_adx_bmi2_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 90 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 95 column 49 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> adx_enabled /\ bmi2_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 96 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_adx_bmi2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_adx_bmi2_support (va_code_Check_adx_bmi2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Avx
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Avx ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_avx_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 131 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 133 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 134 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 135 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 136 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 25) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 137 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 138 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 268435456)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 139 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (268435456 == Prims.pow2 28)) (fun _ -> (fun (p:prop) -> p)
(268435456 == Prims.pow2 28)) (fun (_:unit) -> assert_normalize (268435456 == Prims.pow2 28))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 141 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 27)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 142 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 28) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 143 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 27) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 145 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 123 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 128 column 39 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 129 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx_support (va_code_Check_avx_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx2_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx2_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx2
()) (va_CCons (va_code_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx2_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx2 ()) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_avx2_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_avx2_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 156 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 158 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 159 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 160 column 15 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx2 ()) (fun (va_s:va_state) _ -> let (va_arg11:Vale.Def.Types_s.nat64) =
va_get_reg64 rRbx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 161 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg11 5) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 162 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 32)) (fun (va_s:va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 163 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (32 == Prims.pow2 5)) (fun _ -> (fun (p:prop) -> p) (32 ==
Prims.pow2 5)) (fun (_:unit) -> assert_normalize (32 == Prims.pow2 5)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 164 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 166 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_avx2_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_avx2_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_avx2_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 148 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 153 column 40 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> avx2_cpuid_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 154 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_avx2_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_avx2_support (va_code_Check_avx2_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_movbe_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_movbe_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Movbe
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_movbe_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Movbe ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_movbe_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_movbe_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 177 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 179 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 180 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 181 column 16 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Movbe ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 182 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 22) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 183 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 184 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 4194304)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 185 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (4194304 == Prims.pow2 22)) (fun _ -> (fun (p:prop) -> p)
(4194304 == Prims.pow2 22)) (fun (_:unit) -> assert_normalize (4194304 == Prims.pow2 22))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 21)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 188 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 22) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 189 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 21) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 191 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_movbe_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_movbe_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_movbe_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 169 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 174 column 35 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> movbe_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 175 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_movbe_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_movbe_support (va_code_Check_movbe_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_sse_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_sse_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Sse
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_sse_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Sse ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (va_pbool_and (va_codegen_success_Shr64
(va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue ()))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_sse_support (va_mods:va_mods_t) : (va_quickCode unit (va_code_Check_sse_support
())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 202 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 204 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 205 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 206 column 14 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Sse ()) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 209 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (fun (va_s:va_state) _
-> let (va_arg35:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 211 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg35 9) (let
(va_arg34:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 212 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg34 26) (let
(va_arg33:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 213 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg33 19) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 215 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 524288)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 216 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 512)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 217 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 67108864)) (fun (va_s:va_state) _
-> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 219 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (512 == Prims.pow2 9)) (fun _ -> (fun (p:prop) -> p) (512 ==
Prims.pow2 9)) (fun (_:unit) -> assert_normalize (512 == Prims.pow2 9)) (va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 220 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (524288 == Prims.pow2 19)) (fun _ -> (fun (p:prop) -> p) (524288
== Prims.pow2 19)) (fun (_:unit) -> assert_normalize (524288 == Prims.pow2 19)) (va_QLemma
va_range1
"***** PRECONDITION NOT MET AT line 221 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (67108864 == Prims.pow2 26)) (fun _ -> (fun (p:prop) -> p)
(67108864 == Prims.pow2 26)) (fun (_:unit) -> assert_normalize (67108864 == Prims.pow2 26))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 223 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 10)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 224 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 19) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 225 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 10) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 227 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRdx) (va_const_shift_amt64 17)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 228 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 9 26) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 229 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 17) (let
(va_arg32:Vale.Def.Types_s.nat64) = va_get_reg64 rRdx va_s in let
(va_arg31:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 231 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg31 va_arg32 9) (let
(va_arg30:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 232 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg30 9) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 233 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRdx)) (fun (va_s:va_state) _
-> let (va_arg29:Vale.Def.Types_s.nat64) = va_get_reg64 rRcx va_s in let
(va_arg28:Vale.Def.Types_s.nat64) = va_get_reg64 rRax va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 234 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64 va_arg28 va_arg29 9) (va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 235 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 237 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_sse_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_sse_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_sse_support ()) va_qc va_s0 (fun
va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 194 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 199 column 33 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> sse_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 200 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_sse_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_sse_support (va_code_Check_sse_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_rdrand_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_rdrand_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_CCons (va_code_Cpuid_Rdrand
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_CCons
(va_code_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_CCons
(va_code_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_rdrand_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1))
(va_pbool_and (va_codegen_success_Cpuid_Rdrand ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_ttrue
())))))))))
[@ "opaque_to_smt" va_qattr]
let va_qcode_Check_rdrand_support (va_mods:va_mods_t) : (va_quickCode unit
(va_code_Check_rdrand_support ())) =
(qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 248 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 250 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 251 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 252 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Rdrand ()) (fun (va_s:va_state) _ -> let (va_arg14:Vale.Def.Types_s.nat64) =
va_get_reg64 rRcx va_s in va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 253 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg14 30) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 254 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRcx)) (va_QBind va_range1
"***** PRECONDITION NOT MET AT line 255 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 1073741824)) (fun (va_s:va_state)
_ -> va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 256 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p:prop) -> normalize p) (1073741824 == Prims.pow2 30)) (fun _ -> (fun (p:prop) -> p)
(1073741824 == Prims.pow2 30)) (fun (_:unit) -> assert_normalize (1073741824 == Prims.pow2 30))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 258 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 29)) (fun (va_s:va_state) _
-> va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 259 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_pow2_diff64 1 30) (va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 260 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_:unit) -> Vale.Arch.TypesNative.lemma_ishr_zero64 29) (va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_QEmpty
(())))))))))))))))
[@"opaque_to_smt"]
let va_lemma_Check_rdrand_support va_b0 va_s0 =
let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok] in
let va_qc = va_qcode_Check_rdrand_support va_mods in
let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Check_rdrand_support ()) va_qc va_s0
(fun va_s0 va_sM va_g -> let () = va_g in label va_range1
"***** POSTCONDITION NOT MET AT line 240 column 1 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_ok va_sM) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 245 column 36 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRax va_sM =!= 0 ==> rdrand_enabled) /\ label va_range1
"***** POSTCONDITION NOT MET AT line 246 column 24 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0)) in
assert_norm (va_qc.mods == va_mods);
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0;
(va_sM, va_fM)
[@"opaque_to_smt"]
let va_wpProof_Check_rdrand_support va_s0 va_k =
let (va_sM, va_f0) = va_lemma_Check_rdrand_support (va_code_Check_rdrand_support ()) va_s0 in
va_lemma_upd_update va_sM;
assert (va_state_eq va_sM (va_update_flags va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rRdx
va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM
(va_update_ok va_sM va_s0))))))));
va_lemma_norm_mods ([va_Mod_flags; va_Mod_reg64 rR9; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx;
va_Mod_reg64 rRbx; va_Mod_reg64 rRax]) va_sM va_s0;
let va_g = () in
(va_sM, va_f0, va_g)
//--
//-- Check_avx512_support
[@ "opaque_to_smt" va_qattr]
let va_code_Check_avx512_support () =
(va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0)) (va_CCons (va_code_Cpuid_Avx512
()) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons
(va_code_Mov64 (va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_CCons (va_code_Shr64
(va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10)) (va_CCons (va_code_And64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11)) (va_CCons (va_code_Mov64
(va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9)) (va_CNil ())))))))))))))))))))))
[@ "opaque_to_smt" va_qattr]
let va_codegen_success_Check_avx512_support () =
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_pbool_and (va_codegen_success_Cpuid_Avx512 ()) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR10) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Mov64
(va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRbx) (va_const_opr64 65536)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rRax) (va_const_opr64 131072)) (va_pbool_and (va_codegen_success_And64
(va_op_dst_opr64_reg64 rR10) (va_const_opr64 1073741824)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rRax) (va_const_shift_amt64 1)) (va_pbool_and
(va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR10) (va_const_shift_amt64 14)) (va_pbool_and
(va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rRbx)) (va_pbool_and
(va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_const_opr64 2147483648))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rR11) (va_op_opr64_reg64 rRbx))
(va_pbool_and (va_codegen_success_Shr64 (va_op_dst_opr64_reg64 rR11) (va_const_shift_amt64 15))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR10))
(va_pbool_and (va_codegen_success_And64 (va_op_dst_opr64_reg64 rRax) (va_op_opr64_reg64 rR11))
(va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRbx) (va_op_opr64_reg64 rR9))
(va_ttrue ())))))))))))))))))))) | {
"checked_file": "/",
"dependencies": [
"Vale.X64.State.fsti.checked",
"Vale.X64.QuickCodes.fsti.checked",
"Vale.X64.QuickCode.fst.checked",
"Vale.X64.Memory.fsti.checked",
"Vale.X64.Machine_s.fst.checked",
"Vale.X64.InsBasic.fsti.checked",
"Vale.X64.Decls.fsti.checked",
"Vale.X64.CPU_Features_s.fst.checked",
"Vale.Lib.Basic.fsti.checked",
"Vale.Def.Types_s.fst.checked",
"Vale.Arch.TypesNative.fsti.checked",
"Vale.Arch.Types.fsti.checked",
"prims.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked"
],
"interface_file": true,
"source_file": "Vale.Lib.X64.Cpuid.fst"
} | [
{
"abbrev": false,
"full_module": "Vale.Lib.Basic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.CPU_Features_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCodes",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.QuickCode",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.InsBasic",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Decls",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.State",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Memory",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.X64.Machine_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Arch.Types",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Def.Types_s",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "Vale.Lib.X64",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 0,
"max_fuel": 1,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": true,
"smtencoding_l_arith_repr": "native",
"smtencoding_nl_arith_repr": "wrapped",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [
"smt.arith.nl=false",
"smt.QI.EAGER_THRESHOLD=100",
"smt.CASE_SPLIT=3"
],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | va_mods: Vale.X64.QuickCode.va_mods_t
-> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.Lib.X64.Cpuid.va_code_Check_avx512_support ()) | Prims.Tot | [
"total"
] | [] | [
"Vale.X64.QuickCode.va_mods_t",
"Vale.X64.QuickCodes.qblock",
"Prims.unit",
"Prims.Cons",
"Vale.X64.Decls.va_code",
"Vale.X64.InsBasic.va_code_Mov64",
"Vale.X64.Decls.va_op_dst_opr64_reg64",
"Vale.X64.Machine_s.rR9",
"Vale.X64.Decls.va_op_opr64_reg64",
"Vale.X64.Machine_s.rRbx",
"Vale.X64.Machine_s.rRax",
"Vale.X64.Decls.va_const_opr64",
"Vale.X64.Machine_s.rRcx",
"Vale.X64.InsBasic.va_code_Cpuid_Avx512",
"Vale.X64.Machine_s.rR10",
"Vale.X64.Machine_s.rR11",
"Vale.X64.InsBasic.va_code_And64",
"Vale.X64.InsBasic.va_code_Shr64",
"Vale.X64.Decls.va_const_shift_amt64",
"Prims.Nil",
"Vale.X64.Machine_s.precode",
"Vale.X64.Decls.ins",
"Vale.X64.Decls.ocmp",
"Vale.X64.Decls.va_state",
"Vale.X64.QuickCodes.va_QSeq",
"Vale.X64.QuickCodes.va_range1",
"Vale.X64.InsBasic.va_quick_Mov64",
"Vale.X64.QuickCodes.va_QBind",
"Vale.X64.InsBasic.va_quick_Cpuid_Avx512",
"Vale.X64.QuickCodes.va_qPURE",
"Prims.pure_post",
"Prims.l_and",
"Prims.l_True",
"Prims.l_Forall",
"Prims.l_imp",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.pow2",
"Prims.l_or",
"Prims.eq2",
"Prims.int",
"Vale.Def.Types_s.iand",
"Prims.op_GreaterThan",
"Prims.op_GreaterThanOrEqual",
"Vale.Arch.TypesNative.lemma_iand_pow2_64",
"Vale.X64.InsBasic.va_quick_And64",
"Vale.X64.QuickCodes.va_QLemma",
"FStar.Pervasives.normalize",
"Prims.squash",
"Vale.Lib.Basic.assert_normalize",
"Vale.X64.InsBasic.va_quick_Shr64",
"Prims.op_LessThanOrEqual",
"Vale.Def.Types_s.ishr",
"Prims.op_Subtraction",
"Vale.Arch.TypesNative.lemma_ishr_pow2_diff64",
"Vale.Arch.TypesNative.lemma_ishr_zero64",
"Prims.l_iff",
"Prims.op_Negation",
"Prims.op_Equality",
"Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64",
"Vale.X64.QuickCodes.va_QEmpty",
"Vale.Def.Words_s.nat64",
"Vale.X64.Decls.va_get_reg64",
"Vale.X64.QuickCodes.quickCodes",
"Vale.X64.State.vale_state",
"Vale.X64.QuickCode.va_quickCode",
"Vale.Lib.X64.Cpuid.va_code_Check_avx512_support"
] | [] | false | false | false | false | false | let va_qcode_Check_avx512_support (va_mods: va_mods_t)
: (va_quickCode unit (va_code_Check_avx512_support ())) =
| (qblock va_mods
(fun (va_s: va_state) ->
let va_old_s:va_state = va_s in
va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 273 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR9) (va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 275 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax) (va_const_opr64 7))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 276 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_const_opr64 0))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 277 column 17 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Cpuid_Avx512 ())
(fun (va_s: va_state) _ ->
let va_arg49:Vale.Def.Types_s.nat64 = va_get_reg64 rRbx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 278 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) -> Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg49 16)
(let va_arg48:Vale.Def.Types_s.nat64 = va_get_reg64 rRbx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 279 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg48 17)
(let va_arg47:Vale.Def.Types_s.nat64 = va_get_reg64 rRbx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 280 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg47 30)
(let va_arg46:Vale.Def.Types_s.nat64 = va_get_reg64 rRbx va_s in
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 281 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun (_: unit) ->
Vale.Arch.TypesNative.lemma_iand_pow2_64 va_arg46 31)
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 284 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rRax)
(va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 285 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR10)
(va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 286 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Mov64 (va_op_dst_opr64_reg64 rR11)
(va_op_opr64_reg64 rRbx))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 288 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRbx)
(va_const_opr64 65536))
(va_QSeq va_range1
"***** PRECONDITION NOT MET AT line 289 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64 rRax
)
(va_const_opr64 131072))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 290 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_And64 (va_op_dst_opr64_reg64
rR10)
(va_const_opr64 1073741824))
(fun (va_s: va_state) _ ->
va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 292 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) -> normalize p
) (65536 == Prims.pow2 16))
(fun _ ->
(fun (p: prop) -> p) (65536 ==
Prims.pow2 16))
(fun (_: unit) ->
assert_normalize (65536 ==
Prims.pow2 16))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 293 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) ->
normalize p) (131072 ==
Prims.pow2 17))
(fun _ ->
(fun (p: prop) -> p) (131072 ==
Prims.pow2 17))
(fun (_: unit) ->
assert_normalize (131072 ==
Prims.pow2 17))
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 294 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) ->
normalize p) (1073741824 ==
Prims.pow2 30))
(fun _ ->
(fun (p: prop) ->
p) (1073741824 ==
Prims.pow2 30)
)
(fun (_: unit) ->
assert_normalize (1073741824 ==
Prims.pow2 30)
)
(va_QLemma va_range1
"***** PRECONDITION NOT MET AT line 295 column 21 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
((fun (p: prop) ->
normalize p)
(2147483648 ==
Prims.pow2 31
))
(fun _ ->
(fun
(p: prop)
->
p) (2147483648 ==
Prims.pow2
31))
(fun (_: unit) ->
assert_normalize
(2147483648 ==
Prims.pow2
31))
(va_QBind va_range1
"***** PRECONDITION NOT MET AT line 297 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(va_quick_Shr64
(va_op_dst_opr64_reg64
rRax)
(va_const_shift_amt64
1))
(fun
(va_s:
va_state
)
_
->
va_qPURE va_range1
"***** PRECONDITION NOT MET AT line 298 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun
(_:
unit
)
->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
16
17
)
(va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 299 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_ishr_zero64
1
)
(va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 301 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_Shr64
(
va_op_dst_opr64_reg64
rR10
)
(
va_const_shift_amt64
14
)
)
(
fun
(
va_s:
va_state
)
_
->
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 302 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
16
30
)
(
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 303 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_ishr_zero64
14
)
(
let
va_arg45:Vale.Def.Types_s.nat64
=
va_get_reg64
rRbx
va_s
in
let
va_arg44:Vale.Def.Types_s.nat64
=
va_get_reg64
rRax
va_s
in
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 305 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64
va_arg44
va_arg45
16
)
(
let
va_arg43:Vale.Def.Types_s.nat64
=
va_get_reg64
rRax
va_s
in
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 306 column 23 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_iand_pow2_64
va_arg43
16
)
(
va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 307 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_And64
(
va_op_dst_opr64_reg64
rRax
)
(
va_op_opr64_reg64
rRbx
)
)
(
va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 310 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_Mov64
(
va_op_dst_opr64_reg64
rRbx
)
(
va_const_opr64
2147483648
)
)
(
va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 311 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_And64
(
va_op_dst_opr64_reg64
rR11
)
(
va_op_opr64_reg64
rRbx
)
)
(
va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 312 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_Shr64
(
va_op_dst_opr64_reg64
rR11
)
(
va_const_shift_amt64
15
)
)
(
fun
(
va_s:
va_state
)
_
->
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 313 column 27 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_ishr_pow2_diff64
16
31
)
(
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 314 column 22 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_ishr_zero64
15
)
(
let
va_arg42:Vale.Def.Types_s.nat64
=
va_get_reg64
rR10
va_s
in
let
va_arg41:Vale.Def.Types_s.nat64
=
va_get_reg64
rRax
va_s
in
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 316 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64
va_arg41
va_arg42
16
)
(
va_QBind
va_range1
"***** PRECONDITION NOT MET AT line 317 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_And64
(
va_op_dst_opr64_reg64
rRax
)
(
va_op_opr64_reg64
rR10
)
)
(
fun
(
va_s:
va_state
)
_
->
let
va_arg40:Vale.Def.Types_s.nat64
=
va_get_reg64
rR11
va_s
in
let
va_arg39:Vale.Def.Types_s.nat64
=
va_get_reg64
rRax
va_s
in
va_qPURE
va_range1
"***** PRECONDITION NOT MET AT line 318 column 29 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
fun
(
_:
unit
)
->
Vale.Arch.TypesNative.lemma_iand_maybe_pow2_64
va_arg39
va_arg40
16
)
(
va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 319 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_And64
(
va_op_dst_opr64_reg64
rRax
)
(
va_op_opr64_reg64
rR11
)
)
(
va_QSeq
va_range1
"***** PRECONDITION NOT MET AT line 321 column 10 of file /home/gebner/fstar_dataset/projects/hacl-star/vale/code/lib/util/x64/Vale.Lib.X64.Cpuid.vaf *****"
(
va_quick_Mov64
(
va_op_dst_opr64_reg64
rRbx
)
(
va_op_opr64_reg64
rR9
)
)
(
va_QEmpty
(
()
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
))
))))))))))))))
))))))) | false |
Spec.Agile.AEAD.fst | Spec.Agile.AEAD.vale_alg_of_alg | val vale_alg_of_alg : a: Spec.Agile.AEAD.alg{a = Spec.Agile.AEAD.AES128_GCM \/ a = Spec.Agile.AEAD.AES256_GCM}
-> Vale.AES.AES_common_s.algorithm | let vale_alg_of_alg (a: alg { a = AES128_GCM \/ a = AES256_GCM }) =
match a with
| AES128_GCM -> Vale.AES.AES_s.AES_128
| AES256_GCM -> Vale.AES.AES_s.AES_256 | {
"file_name": "specs/Spec.Agile.AEAD.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 40,
"end_line": 12,
"start_col": 0,
"start_line": 9
} | module Spec.Agile.AEAD
open FStar.Integers
module S = FStar.Seq
#set-options "--max_fuel 0 --max_ifuel 0" | {
"checked_file": "/",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Words.Seq_s.fsti.checked",
"Vale.AES.GCTR.fst.checked",
"Vale.AES.GCM_s.fst.checked",
"Vale.AES.AES_s.fst.checked",
"Spec.Chacha20Poly1305.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Integers.fst.checked"
],
"interface_file": true,
"source_file": "Spec.Agile.AEAD.fst"
} | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": false,
"full_module": "Spec.Agile",
"short_module": null
},
{
"abbrev": false,
"full_module": "Spec.Agile",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | a: Spec.Agile.AEAD.alg{a = Spec.Agile.AEAD.AES128_GCM \/ a = Spec.Agile.AEAD.AES256_GCM}
-> Vale.AES.AES_common_s.algorithm | Prims.Tot | [
"total"
] | [] | [
"Spec.Agile.AEAD.alg",
"Prims.l_or",
"Prims.b2t",
"Prims.op_Equality",
"Spec.Agile.AEAD.AES128_GCM",
"Spec.Agile.AEAD.AES256_GCM",
"Vale.AES.AES_common_s.AES_128",
"Vale.AES.AES_common_s.AES_256",
"Vale.AES.AES_common_s.algorithm"
] | [] | false | false | false | false | false | let vale_alg_of_alg (a: alg{a = AES128_GCM \/ a = AES256_GCM}) =
| match a with
| AES128_GCM -> Vale.AES.AES_s.AES_128
| AES256_GCM -> Vale.AES.AES_s.AES_256 | false |
|
Spec.Agile.AEAD.fst | Spec.Agile.AEAD.gcm_encrypt_cipher_length | val gcm_encrypt_cipher_length (alg key iv plain auth: _)
: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\ S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures
(let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length c = S.length plain)) | val gcm_encrypt_cipher_length (alg key iv plain auth: _)
: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\ S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures
(let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length c = S.length plain)) | let gcm_encrypt_cipher_length alg key iv plain auth: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\
S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures (
let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length c = S.length plain))
=
Vale.AES.GCM_s.gcm_encrypt_LE_reveal () | {
"file_name": "specs/Spec.Agile.AEAD.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 41,
"end_line": 38,
"start_col": 0,
"start_line": 29
} | module Spec.Agile.AEAD
open FStar.Integers
module S = FStar.Seq
#set-options "--max_fuel 0 --max_ifuel 0"
let vale_alg_of_alg (a: alg { a = AES128_GCM \/ a = AES256_GCM }) =
match a with
| AES128_GCM -> Vale.AES.AES_s.AES_128
| AES256_GCM -> Vale.AES.AES_s.AES_256
// For gctr_encrypt_recursive and its pattern!
friend Vale.AES.GCTR
#push-options "--max_ifuel 1"
let gcm_encrypt_tag_length alg key iv plain auth: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\
S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures (
let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length t = 16))
=
Vale.AES.GCM_s.gcm_encrypt_LE_reveal () | {
"checked_file": "/",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Words.Seq_s.fsti.checked",
"Vale.AES.GCTR.fst.checked",
"Vale.AES.GCM_s.fst.checked",
"Vale.AES.AES_s.fst.checked",
"Spec.Chacha20Poly1305.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Integers.fst.checked"
],
"interface_file": true,
"source_file": "Spec.Agile.AEAD.fst"
} | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": false,
"full_module": "Spec.Agile",
"short_module": null
},
{
"abbrev": false,
"full_module": "Spec.Agile",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
alg: Vale.AES.AES_common_s.algorithm ->
key: FStar.Seq.Base.seq Vale.Def.Types_s.nat8 ->
iv: Vale.AES.GCM_s.supported_iv_LE ->
plain: FStar.Seq.Base.seq Vale.Def.Types_s.nat8 ->
auth: FStar.Seq.Base.seq Vale.Def.Types_s.nat8
-> FStar.Pervasives.Lemma
(requires
Vale.AES.AES_common_s.is_aes_key alg key /\
FStar.Seq.Base.length plain < Vale.Def.Words_s.pow2_32 /\
FStar.Seq.Base.length auth < Vale.Def.Words_s.pow2_32)
(ensures
(let _ = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
(let FStar.Pervasives.Native.Mktuple2 #_ #_ c _ = _ in
FStar.Seq.Base.length c = FStar.Seq.Base.length plain)
<:
Type0)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.AES.AES_common_s.algorithm",
"FStar.Seq.Base.seq",
"Vale.Def.Types_s.nat8",
"Vale.AES.GCM_s.supported_iv_LE",
"Vale.AES.GCM_s.gcm_encrypt_LE_reveal",
"Prims.unit",
"Prims.l_and",
"Vale.AES.AES_common_s.is_aes_key",
"Prims.b2t",
"FStar.Integers.op_Less",
"FStar.Integers.Signed",
"FStar.Integers.Winfinite",
"FStar.Seq.Base.length",
"Vale.Def.Words_s.pow2_32",
"Prims.squash",
"Prims.op_Equality",
"Prims.nat",
"FStar.Pervasives.Native.tuple2",
"Vale.Def.Words_s.nat8",
"Vale.AES.GCM_s.gcm_encrypt_LE",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let gcm_encrypt_cipher_length alg key iv plain auth
: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\ S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures
(let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length c = S.length plain)) =
| Vale.AES.GCM_s.gcm_encrypt_LE_reveal () | false |
Spec.Agile.AEAD.fst | Spec.Agile.AEAD.encrypt | val encrypt: #(a: supported_alg) -> kv a -> iv a -> ad a -> p:plain a -> encrypted p | val encrypt: #(a: supported_alg) -> kv a -> iv a -> ad a -> p:plain a -> encrypted p | let encrypt #a kv iv ad plain =
match a with
| CHACHA20_POLY1305 ->
Spec.Chacha20Poly1305.aead_encrypt kv iv plain ad
| AES128_GCM | AES256_GCM ->
// This step needs friend'ing.
let kv_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 kv in
// The specification of gcm_encrypt_LE takes care of computing a valid
// GCM iv from an arbitrary length iv. Hence the iv is the sequence of bytes
let iv_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 iv in
// `ad` is called `auth` in Vale world; "additional data", "authenticated
// data", potato, potato
let ad_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 ad in
let plain_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 plain in
let cipher_nat, tag_nat =
Vale.AES.GCM_s.gcm_encrypt_LE (vale_alg_of_alg a) kv_nat iv_nat plain_nat ad_nat
in
let cipher = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 cipher_nat in
let tag = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 tag_nat in
gcm_encrypt_tag_length (vale_alg_of_alg a) kv_nat iv_nat plain_nat ad_nat;
gcm_encrypt_cipher_length (vale_alg_of_alg a) kv_nat iv_nat plain_nat ad_nat;
// one more spec discrepancy: Vale returns the cipher and tag separated,
// while HACL* bundles them together; another arbitrary choice here
Seq.append cipher tag | {
"file_name": "specs/Spec.Agile.AEAD.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 69,
"start_col": 0,
"start_line": 45
} | module Spec.Agile.AEAD
open FStar.Integers
module S = FStar.Seq
#set-options "--max_fuel 0 --max_ifuel 0"
let vale_alg_of_alg (a: alg { a = AES128_GCM \/ a = AES256_GCM }) =
match a with
| AES128_GCM -> Vale.AES.AES_s.AES_128
| AES256_GCM -> Vale.AES.AES_s.AES_256
// For gctr_encrypt_recursive and its pattern!
friend Vale.AES.GCTR
#push-options "--max_ifuel 1"
let gcm_encrypt_tag_length alg key iv plain auth: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\
S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures (
let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length t = 16))
=
Vale.AES.GCM_s.gcm_encrypt_LE_reveal ()
let gcm_encrypt_cipher_length alg key iv plain auth: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\
S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures (
let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length c = S.length plain))
=
Vale.AES.GCM_s.gcm_encrypt_LE_reveal ()
#pop-options
// TODO remove me once seq_uint8_to_seq_nat8 takes Lib.IntTypes.uint8
friend Lib.IntTypes | {
"checked_file": "/",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Words.Seq_s.fsti.checked",
"Vale.AES.GCTR.fst.checked",
"Vale.AES.GCM_s.fst.checked",
"Vale.AES.AES_s.fst.checked",
"Spec.Chacha20Poly1305.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Integers.fst.checked"
],
"interface_file": true,
"source_file": "Spec.Agile.AEAD.fst"
} | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": false,
"full_module": "Spec.Agile",
"short_module": null
},
{
"abbrev": false,
"full_module": "Spec.Agile",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 20,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
kv: Spec.Agile.AEAD.kv a ->
iv: Spec.Agile.AEAD.iv a ->
ad: Spec.Agile.AEAD.ad a ->
p: Spec.Agile.AEAD.plain a
-> Spec.Agile.AEAD.encrypted p | Prims.Tot | [
"total"
] | [] | [
"Spec.Agile.AEAD.supported_alg",
"Spec.Agile.AEAD.kv",
"Spec.Agile.AEAD.iv",
"Spec.Agile.AEAD.ad",
"Spec.Agile.AEAD.plain",
"Spec.Chacha20Poly1305.aead_encrypt",
"FStar.Seq.Base.seq",
"Vale.Def.Types_s.nat8",
"FStar.Seq.Base.append",
"FStar.UInt8.t",
"Prims.unit",
"Spec.Agile.AEAD.gcm_encrypt_cipher_length",
"Spec.Agile.AEAD.vale_alg_of_alg",
"Spec.Agile.AEAD.gcm_encrypt_tag_length",
"Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8",
"Spec.Agile.AEAD.encrypted",
"FStar.Pervasives.Native.tuple2",
"Vale.Def.Words_s.nat8",
"Vale.AES.GCM_s.gcm_encrypt_LE",
"Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8"
] | [] | false | false | false | false | false | let encrypt #a kv iv ad plain =
| match a with
| CHACHA20_POLY1305 -> Spec.Chacha20Poly1305.aead_encrypt kv iv plain ad
| AES128_GCM
| AES256_GCM ->
let kv_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 kv in
let iv_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 iv in
let ad_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 ad in
let plain_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 plain in
let cipher_nat, tag_nat =
Vale.AES.GCM_s.gcm_encrypt_LE (vale_alg_of_alg a) kv_nat iv_nat plain_nat ad_nat
in
let cipher = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 cipher_nat in
let tag = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 tag_nat in
gcm_encrypt_tag_length (vale_alg_of_alg a) kv_nat iv_nat plain_nat ad_nat;
gcm_encrypt_cipher_length (vale_alg_of_alg a) kv_nat iv_nat plain_nat ad_nat;
Seq.append cipher tag | false |
Spec.Agile.AEAD.fst | Spec.Agile.AEAD.decrypt | val decrypt: #(a: supported_alg) -> kv a -> iv a -> ad a -> c:cipher a -> option (decrypted c) | val decrypt: #(a: supported_alg) -> kv a -> iv a -> ad a -> c:cipher a -> option (decrypted c) | let decrypt #a kv iv ad cipher =
let tag = S.slice cipher (S.length cipher - tag_length a) (S.length cipher) in
let cipher = S.slice cipher 0 (S.length cipher - tag_length a) in
match a with
| CHACHA20_POLY1305 ->
Spec.Chacha20Poly1305.aead_decrypt kv iv cipher tag ad
| AES128_GCM | AES256_GCM ->
let kv_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 kv in
let iv_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 iv in
let ad_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 ad in
let cipher_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 cipher in
let tag_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 tag in
let plain_nat, success =
Vale.AES.GCM_s.gcm_decrypt_LE (vale_alg_of_alg a) kv_nat iv_nat cipher_nat ad_nat tag_nat
in
gcm_decrypt_cipher_length (vale_alg_of_alg a) kv_nat iv_nat cipher_nat ad_nat tag_nat;
let plain = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 plain_nat in
if success then Some plain else None | {
"file_name": "specs/Spec.Agile.AEAD.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 42,
"end_line": 105,
"start_col": 0,
"start_line": 87
} | module Spec.Agile.AEAD
open FStar.Integers
module S = FStar.Seq
#set-options "--max_fuel 0 --max_ifuel 0"
let vale_alg_of_alg (a: alg { a = AES128_GCM \/ a = AES256_GCM }) =
match a with
| AES128_GCM -> Vale.AES.AES_s.AES_128
| AES256_GCM -> Vale.AES.AES_s.AES_256
// For gctr_encrypt_recursive and its pattern!
friend Vale.AES.GCTR
#push-options "--max_ifuel 1"
let gcm_encrypt_tag_length alg key iv plain auth: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\
S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures (
let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length t = 16))
=
Vale.AES.GCM_s.gcm_encrypt_LE_reveal ()
let gcm_encrypt_cipher_length alg key iv plain auth: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\
S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures (
let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length c = S.length plain))
=
Vale.AES.GCM_s.gcm_encrypt_LE_reveal ()
#pop-options
// TODO remove me once seq_uint8_to_seq_nat8 takes Lib.IntTypes.uint8
friend Lib.IntTypes
#push-options "--z3rlimit 20"
let encrypt #a kv iv ad plain =
match a with
| CHACHA20_POLY1305 ->
Spec.Chacha20Poly1305.aead_encrypt kv iv plain ad
| AES128_GCM | AES256_GCM ->
// This step needs friend'ing.
let kv_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 kv in
// The specification of gcm_encrypt_LE takes care of computing a valid
// GCM iv from an arbitrary length iv. Hence the iv is the sequence of bytes
let iv_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 iv in
// `ad` is called `auth` in Vale world; "additional data", "authenticated
// data", potato, potato
let ad_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 ad in
let plain_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 plain in
let cipher_nat, tag_nat =
Vale.AES.GCM_s.gcm_encrypt_LE (vale_alg_of_alg a) kv_nat iv_nat plain_nat ad_nat
in
let cipher = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 cipher_nat in
let tag = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 tag_nat in
gcm_encrypt_tag_length (vale_alg_of_alg a) kv_nat iv_nat plain_nat ad_nat;
gcm_encrypt_cipher_length (vale_alg_of_alg a) kv_nat iv_nat plain_nat ad_nat;
// one more spec discrepancy: Vale returns the cipher and tag separated,
// while HACL* bundles them together; another arbitrary choice here
Seq.append cipher tag
#pop-options
#push-options "--max_ifuel 1"
let gcm_decrypt_cipher_length alg key iv plain auth tag: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\
S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures (
let c, t = Vale.AES.GCM_s.gcm_decrypt_LE alg key iv plain auth tag in
S.length c = S.length plain))
=
Vale.AES.GCM_s.gcm_decrypt_LE_reveal ()
#pop-options
// Note: bundling cipher and tag together is a pain... | {
"checked_file": "/",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Words.Seq_s.fsti.checked",
"Vale.AES.GCTR.fst.checked",
"Vale.AES.GCM_s.fst.checked",
"Vale.AES.AES_s.fst.checked",
"Spec.Chacha20Poly1305.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Integers.fst.checked"
],
"interface_file": true,
"source_file": "Spec.Agile.AEAD.fst"
} | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": false,
"full_module": "Spec.Agile",
"short_module": null
},
{
"abbrev": false,
"full_module": "Spec.Agile",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 20,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
kv: Spec.Agile.AEAD.kv a ->
iv: Spec.Agile.AEAD.iv a ->
ad: Spec.Agile.AEAD.ad a ->
c: Spec.Agile.AEAD.cipher a
-> FStar.Pervasives.Native.option (Spec.Agile.AEAD.decrypted c) | Prims.Tot | [
"total"
] | [] | [
"Spec.Agile.AEAD.supported_alg",
"Spec.Agile.AEAD.kv",
"Spec.Agile.AEAD.iv",
"Spec.Agile.AEAD.ad",
"Spec.Agile.AEAD.cipher",
"Spec.Chacha20Poly1305.aead_decrypt",
"FStar.Seq.Base.seq",
"Vale.Def.Types_s.nat8",
"Prims.bool",
"FStar.Pervasives.Native.Some",
"Spec.Agile.AEAD.decrypted",
"FStar.Pervasives.Native.None",
"FStar.Pervasives.Native.option",
"FStar.UInt8.t",
"Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8",
"Prims.unit",
"Spec.Agile.AEAD.gcm_decrypt_cipher_length",
"Spec.Agile.AEAD.vale_alg_of_alg",
"FStar.Pervasives.Native.tuple2",
"Vale.Def.Words_s.nat8",
"Vale.AES.GCM_s.gcm_decrypt_LE",
"Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8",
"Spec.Agile.AEAD.uint8",
"FStar.Seq.Base.slice",
"FStar.Integers.op_Subtraction",
"FStar.Integers.Signed",
"FStar.Integers.Winfinite",
"FStar.Seq.Base.length",
"Spec.Agile.AEAD.tag_length"
] | [] | false | false | false | false | false | let decrypt #a kv iv ad cipher =
| let tag = S.slice cipher (S.length cipher - tag_length a) (S.length cipher) in
let cipher = S.slice cipher 0 (S.length cipher - tag_length a) in
match a with
| CHACHA20_POLY1305 -> Spec.Chacha20Poly1305.aead_decrypt kv iv cipher tag ad
| AES128_GCM
| AES256_GCM ->
let kv_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 kv in
let iv_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 iv in
let ad_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 ad in
let cipher_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 cipher in
let tag_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 tag in
let plain_nat, success =
Vale.AES.GCM_s.gcm_decrypt_LE (vale_alg_of_alg a) kv_nat iv_nat cipher_nat ad_nat tag_nat
in
gcm_decrypt_cipher_length (vale_alg_of_alg a) kv_nat iv_nat cipher_nat ad_nat tag_nat;
let plain = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 plain_nat in
if success then Some plain else None | false |
Spec.Agile.AEAD.fst | Spec.Agile.AEAD.gcm_decrypt_cipher_length | val gcm_decrypt_cipher_length (alg key iv plain auth tag: _)
: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\ S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures
(let c, t = Vale.AES.GCM_s.gcm_decrypt_LE alg key iv plain auth tag in
S.length c = S.length plain)) | val gcm_decrypt_cipher_length (alg key iv plain auth tag: _)
: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\ S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures
(let c, t = Vale.AES.GCM_s.gcm_decrypt_LE alg key iv plain auth tag in
S.length c = S.length plain)) | let gcm_decrypt_cipher_length alg key iv plain auth tag: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\
S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures (
let c, t = Vale.AES.GCM_s.gcm_decrypt_LE alg key iv plain auth tag in
S.length c = S.length plain))
=
Vale.AES.GCM_s.gcm_decrypt_LE_reveal () | {
"file_name": "specs/Spec.Agile.AEAD.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 41,
"end_line": 82,
"start_col": 0,
"start_line": 73
} | module Spec.Agile.AEAD
open FStar.Integers
module S = FStar.Seq
#set-options "--max_fuel 0 --max_ifuel 0"
let vale_alg_of_alg (a: alg { a = AES128_GCM \/ a = AES256_GCM }) =
match a with
| AES128_GCM -> Vale.AES.AES_s.AES_128
| AES256_GCM -> Vale.AES.AES_s.AES_256
// For gctr_encrypt_recursive and its pattern!
friend Vale.AES.GCTR
#push-options "--max_ifuel 1"
let gcm_encrypt_tag_length alg key iv plain auth: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\
S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures (
let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length t = 16))
=
Vale.AES.GCM_s.gcm_encrypt_LE_reveal ()
let gcm_encrypt_cipher_length alg key iv plain auth: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\
S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures (
let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length c = S.length plain))
=
Vale.AES.GCM_s.gcm_encrypt_LE_reveal ()
#pop-options
// TODO remove me once seq_uint8_to_seq_nat8 takes Lib.IntTypes.uint8
friend Lib.IntTypes
#push-options "--z3rlimit 20"
let encrypt #a kv iv ad plain =
match a with
| CHACHA20_POLY1305 ->
Spec.Chacha20Poly1305.aead_encrypt kv iv plain ad
| AES128_GCM | AES256_GCM ->
// This step needs friend'ing.
let kv_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 kv in
// The specification of gcm_encrypt_LE takes care of computing a valid
// GCM iv from an arbitrary length iv. Hence the iv is the sequence of bytes
let iv_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 iv in
// `ad` is called `auth` in Vale world; "additional data", "authenticated
// data", potato, potato
let ad_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 ad in
let plain_nat = Vale.Def.Words.Seq_s.seq_uint8_to_seq_nat8 plain in
let cipher_nat, tag_nat =
Vale.AES.GCM_s.gcm_encrypt_LE (vale_alg_of_alg a) kv_nat iv_nat plain_nat ad_nat
in
let cipher = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 cipher_nat in
let tag = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 tag_nat in
gcm_encrypt_tag_length (vale_alg_of_alg a) kv_nat iv_nat plain_nat ad_nat;
gcm_encrypt_cipher_length (vale_alg_of_alg a) kv_nat iv_nat plain_nat ad_nat;
// one more spec discrepancy: Vale returns the cipher and tag separated,
// while HACL* bundles them together; another arbitrary choice here
Seq.append cipher tag
#pop-options | {
"checked_file": "/",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Words.Seq_s.fsti.checked",
"Vale.AES.GCTR.fst.checked",
"Vale.AES.GCM_s.fst.checked",
"Vale.AES.AES_s.fst.checked",
"Spec.Chacha20Poly1305.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Integers.fst.checked"
],
"interface_file": true,
"source_file": "Spec.Agile.AEAD.fst"
} | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": false,
"full_module": "Spec.Agile",
"short_module": null
},
{
"abbrev": false,
"full_module": "Spec.Agile",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
alg: Vale.AES.AES_common_s.algorithm ->
key: FStar.Seq.Base.seq Vale.Def.Types_s.nat8 ->
iv: Vale.AES.GCM_s.supported_iv_LE ->
plain: FStar.Seq.Base.seq Vale.Def.Types_s.nat8 ->
auth: FStar.Seq.Base.seq Vale.Def.Types_s.nat8 ->
tag: FStar.Seq.Base.seq Vale.Def.Types_s.nat8
-> FStar.Pervasives.Lemma
(requires
Vale.AES.AES_common_s.is_aes_key alg key /\
FStar.Seq.Base.length plain < Vale.Def.Words_s.pow2_32 /\
FStar.Seq.Base.length auth < Vale.Def.Words_s.pow2_32)
(ensures
(let _ = Vale.AES.GCM_s.gcm_decrypt_LE alg key iv plain auth tag in
(let FStar.Pervasives.Native.Mktuple2 #_ #_ c _ = _ in
FStar.Seq.Base.length c = FStar.Seq.Base.length plain)
<:
Type0)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.AES.AES_common_s.algorithm",
"FStar.Seq.Base.seq",
"Vale.Def.Types_s.nat8",
"Vale.AES.GCM_s.supported_iv_LE",
"Vale.AES.GCM_s.gcm_decrypt_LE_reveal",
"Prims.unit",
"Prims.l_and",
"Vale.AES.AES_common_s.is_aes_key",
"Prims.b2t",
"FStar.Integers.op_Less",
"FStar.Integers.Signed",
"FStar.Integers.Winfinite",
"FStar.Seq.Base.length",
"Vale.Def.Words_s.pow2_32",
"Prims.squash",
"Prims.bool",
"Prims.op_Equality",
"Prims.nat",
"FStar.Pervasives.Native.tuple2",
"Vale.Def.Words_s.nat8",
"Vale.AES.GCM_s.gcm_decrypt_LE",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let gcm_decrypt_cipher_length alg key iv plain auth tag
: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\ S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures
(let c, t = Vale.AES.GCM_s.gcm_decrypt_LE alg key iv plain auth tag in
S.length c = S.length plain)) =
| Vale.AES.GCM_s.gcm_decrypt_LE_reveal () | false |
Spec.Agile.AEAD.fst | Spec.Agile.AEAD.gcm_encrypt_tag_length | val gcm_encrypt_tag_length (alg key iv plain auth: _)
: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\ S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures
(let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length t = 16)) | val gcm_encrypt_tag_length (alg key iv plain auth: _)
: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\ S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures
(let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length t = 16)) | let gcm_encrypt_tag_length alg key iv plain auth: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\
S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures (
let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length t = 16))
=
Vale.AES.GCM_s.gcm_encrypt_LE_reveal () | {
"file_name": "specs/Spec.Agile.AEAD.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 41,
"end_line": 27,
"start_col": 0,
"start_line": 18
} | module Spec.Agile.AEAD
open FStar.Integers
module S = FStar.Seq
#set-options "--max_fuel 0 --max_ifuel 0"
let vale_alg_of_alg (a: alg { a = AES128_GCM \/ a = AES256_GCM }) =
match a with
| AES128_GCM -> Vale.AES.AES_s.AES_128
| AES256_GCM -> Vale.AES.AES_s.AES_256
// For gctr_encrypt_recursive and its pattern!
friend Vale.AES.GCTR | {
"checked_file": "/",
"dependencies": [
"Vale.Def.Words_s.fsti.checked",
"Vale.Def.Words.Seq_s.fsti.checked",
"Vale.AES.GCTR.fst.checked",
"Vale.AES.GCM_s.fst.checked",
"Vale.AES.AES_s.fst.checked",
"Spec.Chacha20Poly1305.fst.checked",
"prims.fst.checked",
"Lib.IntTypes.fst.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Integers.fst.checked"
],
"interface_file": true,
"source_file": "Spec.Agile.AEAD.fst"
} | [
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": false,
"full_module": "FStar.Integers",
"short_module": null
},
{
"abbrev": false,
"full_module": "Spec.Agile",
"short_module": null
},
{
"abbrev": false,
"full_module": "Spec.Agile",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 1,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
alg: Vale.AES.AES_common_s.algorithm ->
key: FStar.Seq.Base.seq Vale.Def.Types_s.nat8 ->
iv: Vale.AES.GCM_s.supported_iv_LE ->
plain: FStar.Seq.Base.seq Vale.Def.Types_s.nat8 ->
auth: FStar.Seq.Base.seq Vale.Def.Types_s.nat8
-> FStar.Pervasives.Lemma
(requires
Vale.AES.AES_common_s.is_aes_key alg key /\
FStar.Seq.Base.length plain < Vale.Def.Words_s.pow2_32 /\
FStar.Seq.Base.length auth < Vale.Def.Words_s.pow2_32)
(ensures
(let _ = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
(let FStar.Pervasives.Native.Mktuple2 #_ #_ _ t = _ in
FStar.Seq.Base.length t = 16)
<:
Type0)) | FStar.Pervasives.Lemma | [
"lemma"
] | [] | [
"Vale.AES.AES_common_s.algorithm",
"FStar.Seq.Base.seq",
"Vale.Def.Types_s.nat8",
"Vale.AES.GCM_s.supported_iv_LE",
"Vale.AES.GCM_s.gcm_encrypt_LE_reveal",
"Prims.unit",
"Prims.l_and",
"Vale.AES.AES_common_s.is_aes_key",
"Prims.b2t",
"FStar.Integers.op_Less",
"FStar.Integers.Signed",
"FStar.Integers.Winfinite",
"FStar.Seq.Base.length",
"Vale.Def.Words_s.pow2_32",
"Prims.squash",
"Prims.op_Equality",
"Prims.int",
"FStar.Pervasives.Native.tuple2",
"Vale.Def.Words_s.nat8",
"Vale.AES.GCM_s.gcm_encrypt_LE",
"Prims.Nil",
"FStar.Pervasives.pattern"
] | [] | true | false | true | false | false | let gcm_encrypt_tag_length alg key iv plain auth
: Lemma
(requires
Vale.AES.AES_s.is_aes_key alg key /\ S.length plain < Vale.Def.Words_s.pow2_32 /\
S.length auth < Vale.Def.Words_s.pow2_32)
(ensures
(let c, t = Vale.AES.GCM_s.gcm_encrypt_LE alg key iv plain auth in
S.length t = 16)) =
| Vale.AES.GCM_s.gcm_encrypt_LE_reveal () | false |
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.a_spec | val a_spec : n: Hacl.Spec.Bignum.Definitions.lbignum t len {0 < Hacl.Spec.Bignum.Definitions.bn_v n} -> Type0 | let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n) | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 34,
"start_col": 0,
"start_line": 33
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain! | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | n: Hacl.Spec.Bignum.Definitions.lbignum t len {0 < Hacl.Spec.Bignum.Definitions.bn_v n} -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Spec.Bignum.bn_len",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.Bignum.Definitions.bn_v",
"Lib.NatMod.nat_mod"
] | [] | false | false | false | false | true | let a_spec (#t: limb_t) (#len: SN.bn_len t) (n: BD.lbignum t len {0 < BD.bn_v n}) =
| Lib.NatMod.nat_mod (BD.bn_v n) | false |
|
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.linv | val linv (#t: limb_t) (#len: SN.bn_len t) (n a: BD.lbignum t len) : Type0 | val linv (#t: limb_t) (#len: SN.bn_len t) (n a: BD.lbignum t len) : Type0 | let linv (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len) : Type0 =
BD.bn_v a < BD.bn_v n | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 23,
"end_line": 38,
"start_col": 0,
"start_line": 37
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain!
inline_for_extraction noextract
let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n) | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | n: Hacl.Spec.Bignum.Definitions.lbignum t len -> a: Hacl.Spec.Bignum.Definitions.lbignum t len
-> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Spec.Bignum.bn_len",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.Bignum.Definitions.bn_v"
] | [] | false | false | false | false | true | let linv (#t: limb_t) (#len: SN.bn_len t) (n a: BD.lbignum t len) : Type0 =
| BD.bn_v a < BD.bn_v n | false |
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.refl | val refl (#t: limb_t) (#len: SN.bn_len t) (n: BD.lbignum t len) (a: BD.lbignum t len {linv n a})
: a_spec n | val refl (#t: limb_t) (#len: SN.bn_len t) (n: BD.lbignum t len) (a: BD.lbignum t len {linv n a})
: a_spec n | let refl (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len{linv n a}) : a_spec n =
BD.bn_v a | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 11,
"end_line": 42,
"start_col": 0,
"start_line": 41
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain!
inline_for_extraction noextract
let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n)
inline_for_extraction noextract
let linv (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len) : Type0 =
BD.bn_v a < BD.bn_v n | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
n: Hacl.Spec.Bignum.Definitions.lbignum t len ->
a: Hacl.Spec.Bignum.Definitions.lbignum t len {Hacl.Bignum.MontExponentiation.linv n a}
-> Hacl.Bignum.MontExponentiation.a_spec n | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Spec.Bignum.bn_len",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Bignum.MontExponentiation.linv",
"Hacl.Spec.Bignum.Definitions.bn_v",
"Hacl.Bignum.MontExponentiation.a_spec"
] | [] | false | false | false | false | false | let refl (#t: limb_t) (#len: SN.bn_len t) (n: BD.lbignum t len) (a: BD.lbignum t len {linv n a})
: a_spec n =
| BD.bn_v a | false |
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.mk_to_nat_mont_ll_comm_monoid | val mk_to_nat_mont_ll_comm_monoid
(t: limb_t)
(len: BN.meta_len t)
(n: BD.lbignum t (v len))
(mu: limb t {SM.bn_mont_pre n mu})
: BE.to_comm_monoid t len (len +! len) | val mk_to_nat_mont_ll_comm_monoid
(t: limb_t)
(len: BN.meta_len t)
(n: BD.lbignum t (v len))
(mu: limb t {SM.bn_mont_pre n mu})
: BE.to_comm_monoid t len (len +! len) | let mk_to_nat_mont_ll_comm_monoid
(t:limb_t)
(len:BN.meta_len t)
(n:BD.lbignum t (v len))
(mu:limb t{SM.bn_mont_pre n mu})
: BE.to_comm_monoid t len (len +! len) =
{
BE.a_spec = a_spec n;
BE.comm_monoid = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (BD.bn_v n) (v mu);
BE.linv_ctx = linv_ctx n;
BE.linv = linv n;
BE.refl = refl n;
} | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 1,
"end_line": 65,
"start_col": 0,
"start_line": 53
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain!
inline_for_extraction noextract
let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n)
inline_for_extraction noextract
let linv (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len) : Type0 =
BD.bn_v a < BD.bn_v n
inline_for_extraction noextract
let refl (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len{linv n a}) : a_spec n =
BD.bn_v a
inline_for_extraction noextract
let linv_ctx (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (ctx:BD.lbignum t (len + len)) : Type0 =
let ctx_n = LSeq.sub ctx 0 len in
let ctx_r2 = LSeq.sub ctx len len in
ctx_n == n /\
0 < BD.bn_v n /\ BD.bn_v ctx_r2 = pow2 (2 * bits t * len) % BD.bn_v n | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
t: Hacl.Bignum.Definitions.limb_t ->
len: Hacl.Bignum.meta_len t ->
n: Hacl.Spec.Bignum.Definitions.lbignum t (Lib.IntTypes.v len) ->
mu: Hacl.Bignum.Definitions.limb t {Hacl.Spec.Bignum.Montgomery.bn_mont_pre n mu}
-> Hacl.Impl.Exponentiation.Definitions.to_comm_monoid t len (len +! len) | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.meta_len",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.Definitions.limb",
"Hacl.Spec.Bignum.Montgomery.bn_mont_pre",
"Hacl.Impl.Exponentiation.Definitions.Mkto_comm_monoid",
"Lib.IntTypes.op_Plus_Bang",
"Hacl.Bignum.MontExponentiation.a_spec",
"Hacl.Spec.Exponentiation.Lemmas.mk_nat_mont_ll_comm_monoid",
"Lib.IntTypes.bits",
"Hacl.Spec.Bignum.Definitions.bn_v",
"Lib.IntTypes.SEC",
"Hacl.Bignum.MontExponentiation.linv_ctx",
"Hacl.Bignum.MontExponentiation.linv",
"Hacl.Bignum.MontExponentiation.refl",
"Hacl.Impl.Exponentiation.Definitions.to_comm_monoid"
] | [] | false | false | false | false | false | let mk_to_nat_mont_ll_comm_monoid
(t: limb_t)
(len: BN.meta_len t)
(n: BD.lbignum t (v len))
(mu: limb t {SM.bn_mont_pre n mu})
: BE.to_comm_monoid t len (len +! len) =
| {
BE.a_spec = a_spec n;
BE.comm_monoid = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (BD.bn_v n) (v mu);
BE.linv_ctx = linv_ctx n;
BE.linv = linv n;
BE.refl = refl n
} | false |
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.bn_exp_mont_st | val bn_exp_mont_st : t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | let bn_exp_mont_st (t:limb_t) (len:BN.meta_len t) =
n:lbignum t len
-> mu:limb t
-> r2:lbignum t len
-> aM:lbignum t len
-> bBits:size_t
-> b:lbignum t (blocks0 bBits (size (bits t)))
-> resM:lbignum t len ->
Stack unit
(requires fun h ->
live h n /\ live h aM /\ live h b /\ live h resM /\ live h r2 /\
disjoint resM aM /\ disjoint resM b /\ disjoint resM n /\ disjoint n aM /\
disjoint resM r2 /\ disjoint aM r2 /\ disjoint n r2 /\ disjoint aM b /\
bn_exp_mont_pre (as_seq h n) mu (as_seq h r2) (as_seq h aM) (v bBits) (as_seq h b))
(ensures fun h0 _ h1 -> modifies (loc aM |+| loc resM) h0 h1 /\
(let k1 = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (bn_v h0 n) (v mu) in
bn_v h1 resM == LE.pow k1 (bn_v h0 aM) (bn_v h0 b))) | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 56,
"end_line": 199,
"start_col": 0,
"start_line": 182
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain!
inline_for_extraction noextract
let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n)
inline_for_extraction noextract
let linv (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len) : Type0 =
BD.bn_v a < BD.bn_v n
inline_for_extraction noextract
let refl (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len{linv n a}) : a_spec n =
BD.bn_v a
inline_for_extraction noextract
let linv_ctx (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (ctx:BD.lbignum t (len + len)) : Type0 =
let ctx_n = LSeq.sub ctx 0 len in
let ctx_r2 = LSeq.sub ctx len len in
ctx_n == n /\
0 < BD.bn_v n /\ BD.bn_v ctx_r2 = pow2 (2 * bits t * len) % BD.bn_v n
inline_for_extraction noextract
let mk_to_nat_mont_ll_comm_monoid
(t:limb_t)
(len:BN.meta_len t)
(n:BD.lbignum t (v len))
(mu:limb t{SM.bn_mont_pre n mu})
: BE.to_comm_monoid t len (len +! len) =
{
BE.a_spec = a_spec n;
BE.comm_monoid = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (BD.bn_v n) (v mu);
BE.linv_ctx = linv_ctx n;
BE.linv = linv n;
BE.refl = refl n;
}
inline_for_extraction noextract
val bn_mont_one:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lone_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_one #t k n mu ctx oneM =
[@inline_let] let len = k.BM.bn.BN.len in
let ctx_n = sub ctx 0ul len in
let ctx_r2 = sub ctx len len in
let h0 = ST.get () in
SM.bn_mont_one_lemma n mu (as_seq h0 ctx_r2);
BM.bn_mont_one len k.BM.from ctx_n mu ctx_r2 oneM
inline_for_extraction noextract
val bn_mont_mul:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lmul_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_mul #t k n mu ctx aM bM resM =
let h0 = ST.get () in
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 bM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.mul ctx_n mu aM bM resM
inline_for_extraction noextract
val bn_mont_sqr:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lsqr_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_sqr #t k n mu ctx aM resM =
let h0 = ST.get () in
SM.bn_mont_sqr_lemma n mu (as_seq h0 aM);
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 aM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.sqr ctx_n mu aM resM
inline_for_extraction noextract
let mk_bn_mont_concrete_ops
(t:limb_t)
(k:BM.mont t)
(n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len)))
(mu:limb t{SM.bn_mont_pre n mu}) :
BE.concrete_ops t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len) =
{
BE.to = mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu;
BE.lone = bn_mont_one k n mu;
BE.lmul = bn_mont_mul k n mu;
BE.lsqr = bn_mont_sqr k n mu;
}
///////////////////////////////////////////////////////////////////////
inline_for_extraction noextract
val mk_ctx:
#t:limb_t
-> len:BN.meta_len t
-> n:lbignum t len
-> r2:lbignum t len
-> ctx:lbignum t (len +! len) ->
Stack unit
(requires fun h ->
live h n /\ live h r2 /\ live h ctx /\
disjoint n ctx /\ disjoint r2 ctx /\
0 < bn_v h n /\ bn_v h r2 == pow2 (2 * bits t * v len) % bn_v h n)
(ensures fun h0 _ h1 -> modifies (loc ctx) h0 h1 /\
linv_ctx (as_seq h0 n) (as_seq h1 ctx))
let mk_ctx #t len n r2 ctx =
let h0 = ST.get () in
update_sub ctx 0ul len n;
let h1 = ST.get () in
assert (LSeq.sub (as_seq h1 ctx) 0 (v len) == as_seq h0 n);
update_sub ctx len len r2;
let h2 = ST.get () in
LSeq.eq_intro
(LSeq.sub (as_seq h2 ctx) 0 (v len))
(LSeq.sub (as_seq h1 ctx) 0 (v len));
assert (LSeq.sub (as_seq h2 ctx) 0 (v len) == as_seq h0 n);
assert (LSeq.sub (as_seq h2 ctx) (v len) (v len) == as_seq h0 r2)
noextract
let bn_exp_mont_pre
(#t:limb_t)
(#len:SN.bn_len t)
(n:BD.lbignum t len)
(mu:limb t)
(r2:BD.lbignum t len)
(aM:BD.lbignum t len)
(bBits:size_nat)
(b:BD.lbignum t (BD.blocks0 bBits (bits t)))
=
SM.bn_mont_pre n mu /\
BD.bn_v r2 == pow2 (2 * bits t * len) % BD.bn_v n /\
BD.bn_v b < pow2 bBits /\
BD.bn_v aM < BD.bn_v n | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | t: Hacl.Bignum.Definitions.limb_t -> len: Hacl.Bignum.meta_len t -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.meta_len",
"Hacl.Bignum.Definitions.lbignum",
"Hacl.Bignum.Definitions.limb",
"Lib.IntTypes.size_t",
"Hacl.Bignum.Definitions.blocks0",
"Lib.IntTypes.size",
"Lib.IntTypes.bits",
"Prims.unit",
"FStar.Monotonic.HyperStack.mem",
"Prims.l_and",
"Lib.Buffer.live",
"Lib.Buffer.MUT",
"Lib.Buffer.disjoint",
"Hacl.Bignum.MontExponentiation.bn_exp_mont_pre",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Lib.Buffer.as_seq",
"Lib.Buffer.modifies",
"Lib.Buffer.op_Bar_Plus_Bar",
"Lib.Buffer.loc",
"Prims.eq2",
"Prims.nat",
"Hacl.Bignum.Definitions.bn_v",
"Lib.Exponentiation.Definition.pow",
"Lib.NatMod.nat_mod",
"Lib.Exponentiation.Definition.comm_monoid",
"Hacl.Spec.Exponentiation.Lemmas.mk_nat_mont_ll_comm_monoid",
"Lib.IntTypes.SEC"
] | [] | false | false | false | false | true | let bn_exp_mont_st (t: limb_t) (len: BN.meta_len t) =
|
n: lbignum t len ->
mu: limb t ->
r2: lbignum t len ->
aM: lbignum t len ->
bBits: size_t ->
b: lbignum t (blocks0 bBits (size (bits t))) ->
resM: lbignum t len
-> Stack unit
(requires
fun h ->
live h n /\ live h aM /\ live h b /\ live h resM /\ live h r2 /\ disjoint resM aM /\
disjoint resM b /\ disjoint resM n /\ disjoint n aM /\ disjoint resM r2 /\ disjoint aM r2 /\
disjoint n r2 /\ disjoint aM b /\
bn_exp_mont_pre (as_seq h n) mu (as_seq h r2) (as_seq h aM) (v bBits) (as_seq h b))
(ensures
fun h0 _ h1 ->
modifies (loc aM |+| loc resM) h0 h1 /\
(let k1 = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (bn_v h0 n) (v mu) in
bn_v h1 resM == LE.pow k1 (bn_v h0 aM) (bn_v h0 b))) | false |
|
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.mk_bn_mont_concrete_ops | val mk_bn_mont_concrete_ops
(t: limb_t)
(k: BM.mont t)
(n: Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len)))
(mu: limb t {SM.bn_mont_pre n mu})
: BE.concrete_ops t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len) | val mk_bn_mont_concrete_ops
(t: limb_t)
(k: BM.mont t)
(n: Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len)))
(mu: limb t {SM.bn_mont_pre n mu})
: BE.concrete_ops t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len) | let mk_bn_mont_concrete_ops
(t:limb_t)
(k:BM.mont t)
(n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len)))
(mu:limb t{SM.bn_mont_pre n mu}) :
BE.concrete_ops t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len) =
{
BE.to = mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu;
BE.lone = bn_mont_one k n mu;
BE.lmul = bn_mont_mul k n mu;
BE.lsqr = bn_mont_sqr k n mu;
} | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 1,
"end_line": 131,
"start_col": 0,
"start_line": 120
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain!
inline_for_extraction noextract
let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n)
inline_for_extraction noextract
let linv (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len) : Type0 =
BD.bn_v a < BD.bn_v n
inline_for_extraction noextract
let refl (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len{linv n a}) : a_spec n =
BD.bn_v a
inline_for_extraction noextract
let linv_ctx (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (ctx:BD.lbignum t (len + len)) : Type0 =
let ctx_n = LSeq.sub ctx 0 len in
let ctx_r2 = LSeq.sub ctx len len in
ctx_n == n /\
0 < BD.bn_v n /\ BD.bn_v ctx_r2 = pow2 (2 * bits t * len) % BD.bn_v n
inline_for_extraction noextract
let mk_to_nat_mont_ll_comm_monoid
(t:limb_t)
(len:BN.meta_len t)
(n:BD.lbignum t (v len))
(mu:limb t{SM.bn_mont_pre n mu})
: BE.to_comm_monoid t len (len +! len) =
{
BE.a_spec = a_spec n;
BE.comm_monoid = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (BD.bn_v n) (v mu);
BE.linv_ctx = linv_ctx n;
BE.linv = linv n;
BE.refl = refl n;
}
inline_for_extraction noextract
val bn_mont_one:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lone_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_one #t k n mu ctx oneM =
[@inline_let] let len = k.BM.bn.BN.len in
let ctx_n = sub ctx 0ul len in
let ctx_r2 = sub ctx len len in
let h0 = ST.get () in
SM.bn_mont_one_lemma n mu (as_seq h0 ctx_r2);
BM.bn_mont_one len k.BM.from ctx_n mu ctx_r2 oneM
inline_for_extraction noextract
val bn_mont_mul:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lmul_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_mul #t k n mu ctx aM bM resM =
let h0 = ST.get () in
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 bM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.mul ctx_n mu aM bM resM
inline_for_extraction noextract
val bn_mont_sqr:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lsqr_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_sqr #t k n mu ctx aM resM =
let h0 = ST.get () in
SM.bn_mont_sqr_lemma n mu (as_seq h0 aM);
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 aM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.sqr ctx_n mu aM resM | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
t: Hacl.Bignum.Definitions.limb_t ->
k: Hacl.Bignum.Montgomery.mont t ->
n:
FStar.Ghost.erased (Hacl.Spec.Bignum.Definitions.lbignum t
(Lib.IntTypes.v (Mkbn?.len (Mkmont?.bn k)))) ->
mu:
Hacl.Bignum.Definitions.limb t
{Hacl.Spec.Bignum.Montgomery.bn_mont_pre (FStar.Ghost.reveal n) mu}
-> Hacl.Impl.Exponentiation.Definitions.concrete_ops t
(Mkbn?.len (Mkmont?.bn k))
(Mkbn?.len (Mkmont?.bn k) +! Mkbn?.len (Mkmont?.bn k)) | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.Montgomery.mont",
"FStar.Ghost.erased",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.__proj__Mkbn__item__len",
"Hacl.Bignum.Montgomery.__proj__Mkmont__item__bn",
"Hacl.Bignum.Definitions.limb",
"Hacl.Spec.Bignum.Montgomery.bn_mont_pre",
"FStar.Ghost.reveal",
"Hacl.Impl.Exponentiation.Definitions.Mkconcrete_ops",
"Lib.IntTypes.op_Plus_Bang",
"FStar.Ghost.hide",
"Hacl.Impl.Exponentiation.Definitions.to_comm_monoid",
"Hacl.Bignum.MontExponentiation.mk_to_nat_mont_ll_comm_monoid",
"Hacl.Bignum.MontExponentiation.bn_mont_one",
"Hacl.Bignum.MontExponentiation.bn_mont_mul",
"Hacl.Bignum.MontExponentiation.bn_mont_sqr",
"Hacl.Impl.Exponentiation.Definitions.concrete_ops"
] | [] | false | false | false | false | false | let mk_bn_mont_concrete_ops
(t: limb_t)
(k: BM.mont t)
(n: Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len)))
(mu: limb t {SM.bn_mont_pre n mu})
: BE.concrete_ops t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len) =
| {
BE.to = mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu;
BE.lone = bn_mont_one k n mu;
BE.lmul = bn_mont_mul k n mu;
BE.lsqr = bn_mont_sqr k n mu
} | false |
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.bn_exp_mont_pre | val bn_exp_mont_pre : n: Hacl.Spec.Bignum.Definitions.lbignum t len ->
mu: Hacl.Bignum.Definitions.limb t ->
r2: Hacl.Spec.Bignum.Definitions.lbignum t len ->
aM: Hacl.Spec.Bignum.Definitions.lbignum t len ->
bBits: Lib.IntTypes.size_nat ->
b:
Hacl.Spec.Bignum.Definitions.lbignum t
(Hacl.Spec.Bignum.Definitions.blocks0 bBits (Lib.IntTypes.bits t))
-> Prims.logical | let bn_exp_mont_pre
(#t:limb_t)
(#len:SN.bn_len t)
(n:BD.lbignum t len)
(mu:limb t)
(r2:BD.lbignum t len)
(aM:BD.lbignum t len)
(bBits:size_nat)
(b:BD.lbignum t (BD.blocks0 bBits (bits t)))
=
SM.bn_mont_pre n mu /\
BD.bn_v r2 == pow2 (2 * bits t * len) % BD.bn_v n /\
BD.bn_v b < pow2 bBits /\
BD.bn_v aM < BD.bn_v n | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 25,
"end_line": 178,
"start_col": 0,
"start_line": 165
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain!
inline_for_extraction noextract
let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n)
inline_for_extraction noextract
let linv (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len) : Type0 =
BD.bn_v a < BD.bn_v n
inline_for_extraction noextract
let refl (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len{linv n a}) : a_spec n =
BD.bn_v a
inline_for_extraction noextract
let linv_ctx (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (ctx:BD.lbignum t (len + len)) : Type0 =
let ctx_n = LSeq.sub ctx 0 len in
let ctx_r2 = LSeq.sub ctx len len in
ctx_n == n /\
0 < BD.bn_v n /\ BD.bn_v ctx_r2 = pow2 (2 * bits t * len) % BD.bn_v n
inline_for_extraction noextract
let mk_to_nat_mont_ll_comm_monoid
(t:limb_t)
(len:BN.meta_len t)
(n:BD.lbignum t (v len))
(mu:limb t{SM.bn_mont_pre n mu})
: BE.to_comm_monoid t len (len +! len) =
{
BE.a_spec = a_spec n;
BE.comm_monoid = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (BD.bn_v n) (v mu);
BE.linv_ctx = linv_ctx n;
BE.linv = linv n;
BE.refl = refl n;
}
inline_for_extraction noextract
val bn_mont_one:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lone_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_one #t k n mu ctx oneM =
[@inline_let] let len = k.BM.bn.BN.len in
let ctx_n = sub ctx 0ul len in
let ctx_r2 = sub ctx len len in
let h0 = ST.get () in
SM.bn_mont_one_lemma n mu (as_seq h0 ctx_r2);
BM.bn_mont_one len k.BM.from ctx_n mu ctx_r2 oneM
inline_for_extraction noextract
val bn_mont_mul:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lmul_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_mul #t k n mu ctx aM bM resM =
let h0 = ST.get () in
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 bM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.mul ctx_n mu aM bM resM
inline_for_extraction noextract
val bn_mont_sqr:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lsqr_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_sqr #t k n mu ctx aM resM =
let h0 = ST.get () in
SM.bn_mont_sqr_lemma n mu (as_seq h0 aM);
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 aM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.sqr ctx_n mu aM resM
inline_for_extraction noextract
let mk_bn_mont_concrete_ops
(t:limb_t)
(k:BM.mont t)
(n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len)))
(mu:limb t{SM.bn_mont_pre n mu}) :
BE.concrete_ops t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len) =
{
BE.to = mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu;
BE.lone = bn_mont_one k n mu;
BE.lmul = bn_mont_mul k n mu;
BE.lsqr = bn_mont_sqr k n mu;
}
///////////////////////////////////////////////////////////////////////
inline_for_extraction noextract
val mk_ctx:
#t:limb_t
-> len:BN.meta_len t
-> n:lbignum t len
-> r2:lbignum t len
-> ctx:lbignum t (len +! len) ->
Stack unit
(requires fun h ->
live h n /\ live h r2 /\ live h ctx /\
disjoint n ctx /\ disjoint r2 ctx /\
0 < bn_v h n /\ bn_v h r2 == pow2 (2 * bits t * v len) % bn_v h n)
(ensures fun h0 _ h1 -> modifies (loc ctx) h0 h1 /\
linv_ctx (as_seq h0 n) (as_seq h1 ctx))
let mk_ctx #t len n r2 ctx =
let h0 = ST.get () in
update_sub ctx 0ul len n;
let h1 = ST.get () in
assert (LSeq.sub (as_seq h1 ctx) 0 (v len) == as_seq h0 n);
update_sub ctx len len r2;
let h2 = ST.get () in
LSeq.eq_intro
(LSeq.sub (as_seq h2 ctx) 0 (v len))
(LSeq.sub (as_seq h1 ctx) 0 (v len));
assert (LSeq.sub (as_seq h2 ctx) 0 (v len) == as_seq h0 n);
assert (LSeq.sub (as_seq h2 ctx) (v len) (v len) == as_seq h0 r2) | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
n: Hacl.Spec.Bignum.Definitions.lbignum t len ->
mu: Hacl.Bignum.Definitions.limb t ->
r2: Hacl.Spec.Bignum.Definitions.lbignum t len ->
aM: Hacl.Spec.Bignum.Definitions.lbignum t len ->
bBits: Lib.IntTypes.size_nat ->
b:
Hacl.Spec.Bignum.Definitions.lbignum t
(Hacl.Spec.Bignum.Definitions.blocks0 bBits (Lib.IntTypes.bits t))
-> Prims.logical | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Spec.Bignum.bn_len",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Hacl.Bignum.Definitions.limb",
"Lib.IntTypes.size_nat",
"Hacl.Spec.Bignum.Definitions.blocks0",
"Lib.IntTypes.bits",
"Prims.l_and",
"Hacl.Spec.Bignum.Montgomery.bn_mont_pre",
"Prims.eq2",
"Prims.int",
"Hacl.Spec.Bignum.Definitions.bn_v",
"Prims.op_Modulus",
"Prims.pow2",
"FStar.Mul.op_Star",
"Prims.b2t",
"Prims.op_LessThan",
"Prims.logical"
] | [] | false | false | false | false | true | let bn_exp_mont_pre
(#t: limb_t)
(#len: SN.bn_len t)
(n: BD.lbignum t len)
(mu: limb t)
(r2 aM: BD.lbignum t len)
(bBits: size_nat)
(b: BD.lbignum t (BD.blocks0 bBits (bits t)))
=
| SM.bn_mont_pre n mu /\ BD.bn_v r2 == pow2 ((2 * bits t) * len) % BD.bn_v n /\ BD.bn_v b < pow2 bBits /\
BD.bn_v aM < BD.bn_v n | false |
|
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.linv_ctx | val linv_ctx (#t: limb_t) (#len: SN.bn_len t) (n: BD.lbignum t len) (ctx: BD.lbignum t (len + len))
: Type0 | val linv_ctx (#t: limb_t) (#len: SN.bn_len t) (n: BD.lbignum t len) (ctx: BD.lbignum t (len + len))
: Type0 | let linv_ctx (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (ctx:BD.lbignum t (len + len)) : Type0 =
let ctx_n = LSeq.sub ctx 0 len in
let ctx_r2 = LSeq.sub ctx len len in
ctx_n == n /\
0 < BD.bn_v n /\ BD.bn_v ctx_r2 = pow2 (2 * bits t * len) % BD.bn_v n | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 71,
"end_line": 49,
"start_col": 0,
"start_line": 45
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain!
inline_for_extraction noextract
let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n)
inline_for_extraction noextract
let linv (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len) : Type0 =
BD.bn_v a < BD.bn_v n
inline_for_extraction noextract
let refl (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len{linv n a}) : a_spec n =
BD.bn_v a | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
n: Hacl.Spec.Bignum.Definitions.lbignum t len ->
ctx: Hacl.Spec.Bignum.Definitions.lbignum t (len + len)
-> Type0 | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Spec.Bignum.bn_len",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Prims.op_Addition",
"Prims.l_and",
"Prims.eq2",
"Lib.Sequence.lseq",
"Hacl.Spec.Bignum.Definitions.limb",
"Prims.b2t",
"Prims.op_LessThan",
"Hacl.Spec.Bignum.Definitions.bn_v",
"Prims.op_Equality",
"Prims.int",
"Prims.op_Modulus",
"Prims.pow2",
"FStar.Mul.op_Star",
"Lib.IntTypes.bits",
"FStar.Seq.Base.seq",
"Lib.Sequence.to_seq",
"FStar.Seq.Base.slice",
"Prims.l_Forall",
"Prims.nat",
"Prims.l_or",
"FStar.Seq.Base.index",
"Lib.Sequence.index",
"Lib.Sequence.sub"
] | [] | false | false | false | false | true | let linv_ctx (#t: limb_t) (#len: SN.bn_len t) (n: BD.lbignum t len) (ctx: BD.lbignum t (len + len))
: Type0 =
| let ctx_n = LSeq.sub ctx 0 len in
let ctx_r2 = LSeq.sub ctx len len in
ctx_n == n /\ 0 < BD.bn_v n /\ BD.bn_v ctx_r2 = pow2 ((2 * bits t) * len) % BD.bn_v n | false |
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.bn_mont_one | val bn_mont_one:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lone_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu) | val bn_mont_one:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lone_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu) | let bn_mont_one #t k n mu ctx oneM =
[@inline_let] let len = k.BM.bn.BN.len in
let ctx_n = sub ctx 0ul len in
let ctx_r2 = sub ctx len len in
let h0 = ST.get () in
SM.bn_mont_one_lemma n mu (as_seq h0 ctx_r2);
BM.bn_mont_one len k.BM.from ctx_n mu ctx_r2 oneM | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 51,
"end_line": 83,
"start_col": 0,
"start_line": 77
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain!
inline_for_extraction noextract
let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n)
inline_for_extraction noextract
let linv (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len) : Type0 =
BD.bn_v a < BD.bn_v n
inline_for_extraction noextract
let refl (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len{linv n a}) : a_spec n =
BD.bn_v a
inline_for_extraction noextract
let linv_ctx (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (ctx:BD.lbignum t (len + len)) : Type0 =
let ctx_n = LSeq.sub ctx 0 len in
let ctx_r2 = LSeq.sub ctx len len in
ctx_n == n /\
0 < BD.bn_v n /\ BD.bn_v ctx_r2 = pow2 (2 * bits t * len) % BD.bn_v n
inline_for_extraction noextract
let mk_to_nat_mont_ll_comm_monoid
(t:limb_t)
(len:BN.meta_len t)
(n:BD.lbignum t (v len))
(mu:limb t{SM.bn_mont_pre n mu})
: BE.to_comm_monoid t len (len +! len) =
{
BE.a_spec = a_spec n;
BE.comm_monoid = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (BD.bn_v n) (v mu);
BE.linv_ctx = linv_ctx n;
BE.linv = linv n;
BE.refl = refl n;
}
inline_for_extraction noextract
val bn_mont_one:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lone_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu) | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
k: Hacl.Bignum.Montgomery.mont t ->
n:
FStar.Ghost.erased (Hacl.Spec.Bignum.Definitions.lbignum t
(Lib.IntTypes.v (Mkbn?.len (Mkmont?.bn k)))) ->
mu:
Hacl.Bignum.Definitions.limb t
{Hacl.Spec.Bignum.Montgomery.bn_mont_pre (FStar.Ghost.reveal n) mu}
-> Hacl.Impl.Exponentiation.Definitions.lone_st t
(Mkbn?.len (Mkmont?.bn k))
(Mkbn?.len (Mkmont?.bn k) +! Mkbn?.len (Mkmont?.bn k))
(Hacl.Bignum.MontExponentiation.mk_to_nat_mont_ll_comm_monoid t
(Mkbn?.len (Mkmont?.bn k))
(FStar.Ghost.reveal n)
mu) | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.Montgomery.mont",
"FStar.Ghost.erased",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.__proj__Mkbn__item__len",
"Hacl.Bignum.Montgomery.__proj__Mkmont__item__bn",
"Hacl.Bignum.Definitions.limb",
"Hacl.Spec.Bignum.Montgomery.bn_mont_pre",
"FStar.Ghost.reveal",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Plus_Bang",
"Hacl.Bignum.Montgomery.bn_mont_one",
"Hacl.Bignum.Montgomery.__proj__Mkmont__item__from",
"Prims.unit",
"Hacl.Spec.Bignum.Montgomery.bn_mont_one_lemma",
"Lib.Buffer.as_seq",
"Lib.Buffer.MUT",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get",
"Lib.Buffer.lbuffer_t",
"Lib.IntTypes.int_t",
"Lib.Buffer.sub",
"FStar.UInt32.__uint_to_t",
"Hacl.Bignum.meta_len"
] | [] | false | false | false | false | false | let bn_mont_one #t k n mu ctx oneM =
| [@@ inline_let ]let len = k.BM.bn.BN.len in
let ctx_n = sub ctx 0ul len in
let ctx_r2 = sub ctx len len in
let h0 = ST.get () in
SM.bn_mont_one_lemma n mu (as_seq h0 ctx_r2);
BM.bn_mont_one len k.BM.from ctx_n mu ctx_r2 oneM | false |
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.bn_mont_sqr | val bn_mont_sqr:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lsqr_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu) | val bn_mont_sqr:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lsqr_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu) | let bn_mont_sqr #t k n mu ctx aM resM =
let h0 = ST.get () in
SM.bn_mont_sqr_lemma n mu (as_seq h0 aM);
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 aM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.sqr ctx_n mu aM resM | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 27,
"end_line": 116,
"start_col": 0,
"start_line": 111
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain!
inline_for_extraction noextract
let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n)
inline_for_extraction noextract
let linv (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len) : Type0 =
BD.bn_v a < BD.bn_v n
inline_for_extraction noextract
let refl (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len{linv n a}) : a_spec n =
BD.bn_v a
inline_for_extraction noextract
let linv_ctx (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (ctx:BD.lbignum t (len + len)) : Type0 =
let ctx_n = LSeq.sub ctx 0 len in
let ctx_r2 = LSeq.sub ctx len len in
ctx_n == n /\
0 < BD.bn_v n /\ BD.bn_v ctx_r2 = pow2 (2 * bits t * len) % BD.bn_v n
inline_for_extraction noextract
let mk_to_nat_mont_ll_comm_monoid
(t:limb_t)
(len:BN.meta_len t)
(n:BD.lbignum t (v len))
(mu:limb t{SM.bn_mont_pre n mu})
: BE.to_comm_monoid t len (len +! len) =
{
BE.a_spec = a_spec n;
BE.comm_monoid = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (BD.bn_v n) (v mu);
BE.linv_ctx = linv_ctx n;
BE.linv = linv n;
BE.refl = refl n;
}
inline_for_extraction noextract
val bn_mont_one:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lone_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_one #t k n mu ctx oneM =
[@inline_let] let len = k.BM.bn.BN.len in
let ctx_n = sub ctx 0ul len in
let ctx_r2 = sub ctx len len in
let h0 = ST.get () in
SM.bn_mont_one_lemma n mu (as_seq h0 ctx_r2);
BM.bn_mont_one len k.BM.from ctx_n mu ctx_r2 oneM
inline_for_extraction noextract
val bn_mont_mul:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lmul_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_mul #t k n mu ctx aM bM resM =
let h0 = ST.get () in
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 bM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.mul ctx_n mu aM bM resM
inline_for_extraction noextract
val bn_mont_sqr:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lsqr_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu) | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
k: Hacl.Bignum.Montgomery.mont t ->
n:
FStar.Ghost.erased (Hacl.Spec.Bignum.Definitions.lbignum t
(Lib.IntTypes.v (Mkbn?.len (Mkmont?.bn k)))) ->
mu:
Hacl.Bignum.Definitions.limb t
{Hacl.Spec.Bignum.Montgomery.bn_mont_pre (FStar.Ghost.reveal n) mu}
-> Hacl.Impl.Exponentiation.Definitions.lsqr_st t
(Mkbn?.len (Mkmont?.bn k))
(Mkbn?.len (Mkmont?.bn k) +! Mkbn?.len (Mkmont?.bn k))
(Hacl.Bignum.MontExponentiation.mk_to_nat_mont_ll_comm_monoid t
(Mkbn?.len (Mkmont?.bn k))
(FStar.Ghost.reveal n)
mu) | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.Montgomery.mont",
"FStar.Ghost.erased",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.__proj__Mkbn__item__len",
"Hacl.Bignum.Montgomery.__proj__Mkmont__item__bn",
"Hacl.Bignum.Definitions.limb",
"Hacl.Spec.Bignum.Montgomery.bn_mont_pre",
"FStar.Ghost.reveal",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Plus_Bang",
"Hacl.Bignum.Montgomery.__proj__Mkmont__item__sqr",
"Prims.unit",
"Lib.Buffer.lbuffer_t",
"Lib.Buffer.MUT",
"Lib.IntTypes.int_t",
"Lib.Buffer.sub",
"FStar.UInt32.__uint_to_t",
"Hacl.Spec.Bignum.Montgomery.bn_mont_mul_lemma",
"Lib.Buffer.as_seq",
"Hacl.Spec.Bignum.Montgomery.bn_mont_sqr_lemma",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get"
] | [] | false | false | false | false | false | let bn_mont_sqr #t k n mu ctx aM resM =
| let h0 = ST.get () in
SM.bn_mont_sqr_lemma n mu (as_seq h0 aM);
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 aM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.sqr ctx_n mu aM resM | false |
Hacl.Streaming.Blake2.Common.fst | Hacl.Streaming.Blake2.Common.max_key | val max_key : a: Spec.Blake2.Definitions.alg -> Prims.int | let max_key = Spec.Blake2.max_key | {
"file_name": "code/streaming/Hacl.Streaming.Blake2.Common.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 33,
"end_line": 30,
"start_col": 0,
"start_line": 30
} | module Hacl.Streaming.Blake2.Common
module HS = FStar.HyperStack
module B = LowStar.Buffer
module S = FStar.Seq
module LS = Lib.Sequence
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module I = Hacl.Streaming.Interface
module ST = FStar.HyperStack.ST
open FStar.Mul
module Loops = Lib.LoopCombinators
/// Opening a bunch of modules for Blake2
/// =====================================
inline_for_extraction noextract
let uint8 = Lib.IntTypes.uint8
inline_for_extraction noextract
let uint32 = Lib.IntTypes.uint32
unfold noextract
let size_nat = Lib.IntTypes.size_nat | {
"checked_file": "/",
"dependencies": [
"Spec.Blake2.Alternative.fsti.checked",
"Spec.Blake2.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.UpdateMulti.fst.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Streaming.Interface.fsti.checked",
"Hacl.Impl.Blake2.Generic.fst.checked",
"Hacl.Impl.Blake2.Core.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt128.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Streaming.Blake2.Common.fst"
} | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Streaming.Interface",
"short_module": "I"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | a: Spec.Blake2.Definitions.alg -> Prims.int | Prims.Tot | [
"total"
] | [] | [
"Spec.Blake2.Definitions.max_key"
] | [] | false | false | false | true | false | let max_key =
| Spec.Blake2.max_key | false |
|
Hacl.Streaming.Blake2.Common.fst | Hacl.Streaming.Blake2.Common.uint8 | val uint8 : Type0 | let uint8 = Lib.IntTypes.uint8 | {
"file_name": "code/streaming/Hacl.Streaming.Blake2.Common.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 21,
"start_col": 0,
"start_line": 21
} | module Hacl.Streaming.Blake2.Common
module HS = FStar.HyperStack
module B = LowStar.Buffer
module S = FStar.Seq
module LS = Lib.Sequence
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module I = Hacl.Streaming.Interface
module ST = FStar.HyperStack.ST
open FStar.Mul
module Loops = Lib.LoopCombinators
/// Opening a bunch of modules for Blake2
/// ===================================== | {
"checked_file": "/",
"dependencies": [
"Spec.Blake2.Alternative.fsti.checked",
"Spec.Blake2.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.UpdateMulti.fst.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Streaming.Interface.fsti.checked",
"Hacl.Impl.Blake2.Generic.fst.checked",
"Hacl.Impl.Blake2.Core.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt128.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Streaming.Blake2.Common.fst"
} | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Streaming.Interface",
"short_module": "I"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.uint8"
] | [] | false | false | false | true | true | let uint8 =
| Lib.IntTypes.uint8 | false |
|
Hacl.Streaming.Blake2.Common.fst | Hacl.Streaming.Blake2.Common.index | val index : Prims.eqtype | let index = unit | {
"file_name": "code/streaming/Hacl.Streaming.Blake2.Common.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 16,
"end_line": 45,
"start_col": 0,
"start_line": 45
} | module Hacl.Streaming.Blake2.Common
module HS = FStar.HyperStack
module B = LowStar.Buffer
module S = FStar.Seq
module LS = Lib.Sequence
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module I = Hacl.Streaming.Interface
module ST = FStar.HyperStack.ST
open FStar.Mul
module Loops = Lib.LoopCombinators
/// Opening a bunch of modules for Blake2
/// =====================================
inline_for_extraction noextract
let uint8 = Lib.IntTypes.uint8
inline_for_extraction noextract
let uint32 = Lib.IntTypes.uint32
unfold noextract
let size_nat = Lib.IntTypes.size_nat
unfold noextract
let max_key = Spec.Blake2.max_key
unfold noextract
let lbytes = Lib.ByteSequence.lbytes
module Spec = Spec.Blake2
module Core = Hacl.Impl.Blake2.Core
open Hacl.Impl.Blake2.Generic
/// An instance of the stateful type class for blake2
/// =================================================
#set-options "--max_fuel 0 --max_ifuel 0 --z3rlimit 50" | {
"checked_file": "/",
"dependencies": [
"Spec.Blake2.Alternative.fsti.checked",
"Spec.Blake2.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.UpdateMulti.fst.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Streaming.Interface.fsti.checked",
"Hacl.Impl.Blake2.Generic.fst.checked",
"Hacl.Impl.Blake2.Core.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt128.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Streaming.Blake2.Common.fst"
} | [
{
"abbrev": false,
"full_module": "Hacl.Impl.Blake2.Generic",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Blake2.Core",
"short_module": "Core"
},
{
"abbrev": true,
"full_module": "Spec.Blake2",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Streaming.Interface",
"short_module": "I"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | Prims.eqtype | Prims.Tot | [
"total"
] | [] | [
"Prims.unit"
] | [] | false | false | false | true | false | let index =
| unit | false |
|
Hacl.Streaming.Blake2.Common.fst | Hacl.Streaming.Blake2.Common.lbytes | val lbytes : len: Lib.IntTypes.size_nat -> Type0 | let lbytes = Lib.ByteSequence.lbytes | {
"file_name": "code/streaming/Hacl.Streaming.Blake2.Common.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 36,
"end_line": 33,
"start_col": 0,
"start_line": 33
} | module Hacl.Streaming.Blake2.Common
module HS = FStar.HyperStack
module B = LowStar.Buffer
module S = FStar.Seq
module LS = Lib.Sequence
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module I = Hacl.Streaming.Interface
module ST = FStar.HyperStack.ST
open FStar.Mul
module Loops = Lib.LoopCombinators
/// Opening a bunch of modules for Blake2
/// =====================================
inline_for_extraction noextract
let uint8 = Lib.IntTypes.uint8
inline_for_extraction noextract
let uint32 = Lib.IntTypes.uint32
unfold noextract
let size_nat = Lib.IntTypes.size_nat
unfold noextract
let max_key = Spec.Blake2.max_key | {
"checked_file": "/",
"dependencies": [
"Spec.Blake2.Alternative.fsti.checked",
"Spec.Blake2.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.UpdateMulti.fst.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Streaming.Interface.fsti.checked",
"Hacl.Impl.Blake2.Generic.fst.checked",
"Hacl.Impl.Blake2.Core.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt128.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Streaming.Blake2.Common.fst"
} | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Streaming.Interface",
"short_module": "I"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | len: Lib.IntTypes.size_nat -> Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.ByteSequence.lbytes"
] | [] | false | false | false | true | true | let lbytes =
| Lib.ByteSequence.lbytes | false |
|
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.bn_mont_mul | val bn_mont_mul:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lmul_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu) | val bn_mont_mul:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lmul_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu) | let bn_mont_mul #t k n mu ctx aM bM resM =
let h0 = ST.get () in
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 bM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.mul ctx_n mu aM bM resM | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 30,
"end_line": 99,
"start_col": 0,
"start_line": 95
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain!
inline_for_extraction noextract
let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n)
inline_for_extraction noextract
let linv (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len) : Type0 =
BD.bn_v a < BD.bn_v n
inline_for_extraction noextract
let refl (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len{linv n a}) : a_spec n =
BD.bn_v a
inline_for_extraction noextract
let linv_ctx (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (ctx:BD.lbignum t (len + len)) : Type0 =
let ctx_n = LSeq.sub ctx 0 len in
let ctx_r2 = LSeq.sub ctx len len in
ctx_n == n /\
0 < BD.bn_v n /\ BD.bn_v ctx_r2 = pow2 (2 * bits t * len) % BD.bn_v n
inline_for_extraction noextract
let mk_to_nat_mont_ll_comm_monoid
(t:limb_t)
(len:BN.meta_len t)
(n:BD.lbignum t (v len))
(mu:limb t{SM.bn_mont_pre n mu})
: BE.to_comm_monoid t len (len +! len) =
{
BE.a_spec = a_spec n;
BE.comm_monoid = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (BD.bn_v n) (v mu);
BE.linv_ctx = linv_ctx n;
BE.linv = linv n;
BE.refl = refl n;
}
inline_for_extraction noextract
val bn_mont_one:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lone_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_one #t k n mu ctx oneM =
[@inline_let] let len = k.BM.bn.BN.len in
let ctx_n = sub ctx 0ul len in
let ctx_r2 = sub ctx len len in
let h0 = ST.get () in
SM.bn_mont_one_lemma n mu (as_seq h0 ctx_r2);
BM.bn_mont_one len k.BM.from ctx_n mu ctx_r2 oneM
inline_for_extraction noextract
val bn_mont_mul:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lmul_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu) | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
k: Hacl.Bignum.Montgomery.mont t ->
n:
FStar.Ghost.erased (Hacl.Spec.Bignum.Definitions.lbignum t
(Lib.IntTypes.v (Mkbn?.len (Mkmont?.bn k)))) ->
mu:
Hacl.Bignum.Definitions.limb t
{Hacl.Spec.Bignum.Montgomery.bn_mont_pre (FStar.Ghost.reveal n) mu}
-> Hacl.Impl.Exponentiation.Definitions.lmul_st t
(Mkbn?.len (Mkmont?.bn k))
(Mkbn?.len (Mkmont?.bn k) +! Mkbn?.len (Mkmont?.bn k))
(Hacl.Bignum.MontExponentiation.mk_to_nat_mont_ll_comm_monoid t
(Mkbn?.len (Mkmont?.bn k))
(FStar.Ghost.reveal n)
mu) | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.Montgomery.mont",
"FStar.Ghost.erased",
"Hacl.Spec.Bignum.Definitions.lbignum",
"Lib.IntTypes.v",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Hacl.Bignum.__proj__Mkbn__item__len",
"Hacl.Bignum.Montgomery.__proj__Mkmont__item__bn",
"Hacl.Bignum.Definitions.limb",
"Hacl.Spec.Bignum.Montgomery.bn_mont_pre",
"FStar.Ghost.reveal",
"Lib.Buffer.lbuffer",
"Lib.IntTypes.uint_t",
"Lib.IntTypes.SEC",
"Lib.IntTypes.op_Plus_Bang",
"Hacl.Bignum.Montgomery.__proj__Mkmont__item__mul",
"Prims.unit",
"Lib.Buffer.lbuffer_t",
"Lib.Buffer.MUT",
"Lib.IntTypes.int_t",
"Lib.Buffer.sub",
"FStar.UInt32.__uint_to_t",
"Hacl.Spec.Bignum.Montgomery.bn_mont_mul_lemma",
"Lib.Buffer.as_seq",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get"
] | [] | false | false | false | false | false | let bn_mont_mul #t k n mu ctx aM bM resM =
| let h0 = ST.get () in
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 bM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.mul ctx_n mu aM bM resM | false |
Hacl.Streaming.Blake2.Common.fst | Hacl.Streaming.Blake2.Common.size_nat | val size_nat : Type0 | let size_nat = Lib.IntTypes.size_nat | {
"file_name": "code/streaming/Hacl.Streaming.Blake2.Common.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 36,
"end_line": 27,
"start_col": 0,
"start_line": 27
} | module Hacl.Streaming.Blake2.Common
module HS = FStar.HyperStack
module B = LowStar.Buffer
module S = FStar.Seq
module LS = Lib.Sequence
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module I = Hacl.Streaming.Interface
module ST = FStar.HyperStack.ST
open FStar.Mul
module Loops = Lib.LoopCombinators
/// Opening a bunch of modules for Blake2
/// =====================================
inline_for_extraction noextract
let uint8 = Lib.IntTypes.uint8
inline_for_extraction noextract
let uint32 = Lib.IntTypes.uint32 | {
"checked_file": "/",
"dependencies": [
"Spec.Blake2.Alternative.fsti.checked",
"Spec.Blake2.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.UpdateMulti.fst.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Streaming.Interface.fsti.checked",
"Hacl.Impl.Blake2.Generic.fst.checked",
"Hacl.Impl.Blake2.Core.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt128.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Streaming.Blake2.Common.fst"
} | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Streaming.Interface",
"short_module": "I"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.size_nat"
] | [] | false | false | false | true | true | let size_nat =
| Lib.IntTypes.size_nat | false |
|
Hacl.Streaming.Blake2.Common.fst | Hacl.Streaming.Blake2.Common.alg | val alg : Type0 | let alg = Spec.alg | {
"file_name": "code/streaming/Hacl.Streaming.Blake2.Common.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 18,
"end_line": 48,
"start_col": 0,
"start_line": 48
} | module Hacl.Streaming.Blake2.Common
module HS = FStar.HyperStack
module B = LowStar.Buffer
module S = FStar.Seq
module LS = Lib.Sequence
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module I = Hacl.Streaming.Interface
module ST = FStar.HyperStack.ST
open FStar.Mul
module Loops = Lib.LoopCombinators
/// Opening a bunch of modules for Blake2
/// =====================================
inline_for_extraction noextract
let uint8 = Lib.IntTypes.uint8
inline_for_extraction noextract
let uint32 = Lib.IntTypes.uint32
unfold noextract
let size_nat = Lib.IntTypes.size_nat
unfold noextract
let max_key = Spec.Blake2.max_key
unfold noextract
let lbytes = Lib.ByteSequence.lbytes
module Spec = Spec.Blake2
module Core = Hacl.Impl.Blake2.Core
open Hacl.Impl.Blake2.Generic
/// An instance of the stateful type class for blake2
/// =================================================
#set-options "--max_fuel 0 --max_ifuel 0 --z3rlimit 50"
inline_for_extraction noextract
let index = unit | {
"checked_file": "/",
"dependencies": [
"Spec.Blake2.Alternative.fsti.checked",
"Spec.Blake2.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.UpdateMulti.fst.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Streaming.Interface.fsti.checked",
"Hacl.Impl.Blake2.Generic.fst.checked",
"Hacl.Impl.Blake2.Core.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt128.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Streaming.Blake2.Common.fst"
} | [
{
"abbrev": false,
"full_module": "Hacl.Impl.Blake2.Generic",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Blake2.Core",
"short_module": "Core"
},
{
"abbrev": true,
"full_module": "Spec.Blake2",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Streaming.Interface",
"short_module": "I"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"Spec.Blake2.Definitions.alg"
] | [] | false | false | false | true | true | let alg =
| Spec.alg | false |
|
Hacl.Streaming.Blake2.Common.fst | Hacl.Streaming.Blake2.Common.get_wv | val get_wv (#a: alg) (#m: m_spec) (s: s a m) : Tot (Core.state_p a m) | val get_wv (#a: alg) (#m: m_spec) (s: s a m) : Tot (Core.state_p a m) | let get_wv (#a : alg) (#m : m_spec) (s : s a m) : Tot (Core.state_p a m) =
match s with wv, _ -> wv | {
"file_name": "code/streaming/Hacl.Streaming.Blake2.Common.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 26,
"end_line": 65,
"start_col": 0,
"start_line": 64
} | module Hacl.Streaming.Blake2.Common
module HS = FStar.HyperStack
module B = LowStar.Buffer
module S = FStar.Seq
module LS = Lib.Sequence
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module I = Hacl.Streaming.Interface
module ST = FStar.HyperStack.ST
open FStar.Mul
module Loops = Lib.LoopCombinators
/// Opening a bunch of modules for Blake2
/// =====================================
inline_for_extraction noextract
let uint8 = Lib.IntTypes.uint8
inline_for_extraction noextract
let uint32 = Lib.IntTypes.uint32
unfold noextract
let size_nat = Lib.IntTypes.size_nat
unfold noextract
let max_key = Spec.Blake2.max_key
unfold noextract
let lbytes = Lib.ByteSequence.lbytes
module Spec = Spec.Blake2
module Core = Hacl.Impl.Blake2.Core
open Hacl.Impl.Blake2.Generic
/// An instance of the stateful type class for blake2
/// =================================================
#set-options "--max_fuel 0 --max_ifuel 0 --z3rlimit 50"
inline_for_extraction noextract
let index = unit
inline_for_extraction noextract
let alg = Spec.alg
inline_for_extraction noextract
let m_spec = Core.m_spec
/// The stateful state: (wv, hash)
inline_for_extraction noextract
let s (a : alg) (m : m_spec) = Core.(state_p a m & state_p a m)
inline_for_extraction noextract
let t (a : alg) = Spec.state a
(* In the internal state, we keep wv, the working vector. It's essentially
temporary scratch space that the Blake2 implementation expects to receive. (Why
is the implementation not performing its own stack allocations? Don't know!) *) | {
"checked_file": "/",
"dependencies": [
"Spec.Blake2.Alternative.fsti.checked",
"Spec.Blake2.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.UpdateMulti.fst.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Streaming.Interface.fsti.checked",
"Hacl.Impl.Blake2.Generic.fst.checked",
"Hacl.Impl.Blake2.Core.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt128.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Streaming.Blake2.Common.fst"
} | [
{
"abbrev": false,
"full_module": "Hacl.Impl.Blake2.Generic",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Blake2.Core",
"short_module": "Core"
},
{
"abbrev": true,
"full_module": "Spec.Blake2",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Streaming.Interface",
"short_module": "I"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | s: Hacl.Streaming.Blake2.Common.s a m -> Hacl.Impl.Blake2.Core.state_p a m | Prims.Tot | [
"total"
] | [] | [
"Hacl.Streaming.Blake2.Common.alg",
"Hacl.Streaming.Blake2.Common.m_spec",
"Hacl.Streaming.Blake2.Common.s",
"Hacl.Impl.Blake2.Core.state_p"
] | [] | false | false | false | false | false | let get_wv (#a: alg) (#m: m_spec) (s: s a m) : Tot (Core.state_p a m) =
| match s with | wv, _ -> wv | false |
Hacl.Streaming.Blake2.Common.fst | Hacl.Streaming.Blake2.Common.uint32 | val uint32 : Type0 | let uint32 = Lib.IntTypes.uint32 | {
"file_name": "code/streaming/Hacl.Streaming.Blake2.Common.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 24,
"start_col": 0,
"start_line": 24
} | module Hacl.Streaming.Blake2.Common
module HS = FStar.HyperStack
module B = LowStar.Buffer
module S = FStar.Seq
module LS = Lib.Sequence
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module I = Hacl.Streaming.Interface
module ST = FStar.HyperStack.ST
open FStar.Mul
module Loops = Lib.LoopCombinators
/// Opening a bunch of modules for Blake2
/// =====================================
inline_for_extraction noextract
let uint8 = Lib.IntTypes.uint8 | {
"checked_file": "/",
"dependencies": [
"Spec.Blake2.Alternative.fsti.checked",
"Spec.Blake2.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.UpdateMulti.fst.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Streaming.Interface.fsti.checked",
"Hacl.Impl.Blake2.Generic.fst.checked",
"Hacl.Impl.Blake2.Core.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt128.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Streaming.Blake2.Common.fst"
} | [
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Streaming.Interface",
"short_module": "I"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 8,
"max_ifuel": 2,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 5,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | Type0 | Prims.Tot | [
"total"
] | [] | [
"Lib.IntTypes.uint32"
] | [] | false | false | false | true | true | let uint32 =
| Lib.IntTypes.uint32 | false |
|
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.mk_ctx | val mk_ctx:
#t:limb_t
-> len:BN.meta_len t
-> n:lbignum t len
-> r2:lbignum t len
-> ctx:lbignum t (len +! len) ->
Stack unit
(requires fun h ->
live h n /\ live h r2 /\ live h ctx /\
disjoint n ctx /\ disjoint r2 ctx /\
0 < bn_v h n /\ bn_v h r2 == pow2 (2 * bits t * v len) % bn_v h n)
(ensures fun h0 _ h1 -> modifies (loc ctx) h0 h1 /\
linv_ctx (as_seq h0 n) (as_seq h1 ctx)) | val mk_ctx:
#t:limb_t
-> len:BN.meta_len t
-> n:lbignum t len
-> r2:lbignum t len
-> ctx:lbignum t (len +! len) ->
Stack unit
(requires fun h ->
live h n /\ live h r2 /\ live h ctx /\
disjoint n ctx /\ disjoint r2 ctx /\
0 < bn_v h n /\ bn_v h r2 == pow2 (2 * bits t * v len) % bn_v h n)
(ensures fun h0 _ h1 -> modifies (loc ctx) h0 h1 /\
linv_ctx (as_seq h0 n) (as_seq h1 ctx)) | let mk_ctx #t len n r2 ctx =
let h0 = ST.get () in
update_sub ctx 0ul len n;
let h1 = ST.get () in
assert (LSeq.sub (as_seq h1 ctx) 0 (v len) == as_seq h0 n);
update_sub ctx len len r2;
let h2 = ST.get () in
LSeq.eq_intro
(LSeq.sub (as_seq h2 ctx) 0 (v len))
(LSeq.sub (as_seq h1 ctx) 0 (v len));
assert (LSeq.sub (as_seq h2 ctx) 0 (v len) == as_seq h0 n);
assert (LSeq.sub (as_seq h2 ctx) (v len) (v len) == as_seq h0 r2) | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 67,
"end_line": 161,
"start_col": 0,
"start_line": 150
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain!
inline_for_extraction noextract
let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n)
inline_for_extraction noextract
let linv (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len) : Type0 =
BD.bn_v a < BD.bn_v n
inline_for_extraction noextract
let refl (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len{linv n a}) : a_spec n =
BD.bn_v a
inline_for_extraction noextract
let linv_ctx (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (ctx:BD.lbignum t (len + len)) : Type0 =
let ctx_n = LSeq.sub ctx 0 len in
let ctx_r2 = LSeq.sub ctx len len in
ctx_n == n /\
0 < BD.bn_v n /\ BD.bn_v ctx_r2 = pow2 (2 * bits t * len) % BD.bn_v n
inline_for_extraction noextract
let mk_to_nat_mont_ll_comm_monoid
(t:limb_t)
(len:BN.meta_len t)
(n:BD.lbignum t (v len))
(mu:limb t{SM.bn_mont_pre n mu})
: BE.to_comm_monoid t len (len +! len) =
{
BE.a_spec = a_spec n;
BE.comm_monoid = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (BD.bn_v n) (v mu);
BE.linv_ctx = linv_ctx n;
BE.linv = linv n;
BE.refl = refl n;
}
inline_for_extraction noextract
val bn_mont_one:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lone_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_one #t k n mu ctx oneM =
[@inline_let] let len = k.BM.bn.BN.len in
let ctx_n = sub ctx 0ul len in
let ctx_r2 = sub ctx len len in
let h0 = ST.get () in
SM.bn_mont_one_lemma n mu (as_seq h0 ctx_r2);
BM.bn_mont_one len k.BM.from ctx_n mu ctx_r2 oneM
inline_for_extraction noextract
val bn_mont_mul:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lmul_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_mul #t k n mu ctx aM bM resM =
let h0 = ST.get () in
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 bM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.mul ctx_n mu aM bM resM
inline_for_extraction noextract
val bn_mont_sqr:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lsqr_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_sqr #t k n mu ctx aM resM =
let h0 = ST.get () in
SM.bn_mont_sqr_lemma n mu (as_seq h0 aM);
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 aM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.sqr ctx_n mu aM resM
inline_for_extraction noextract
let mk_bn_mont_concrete_ops
(t:limb_t)
(k:BM.mont t)
(n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len)))
(mu:limb t{SM.bn_mont_pre n mu}) :
BE.concrete_ops t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len) =
{
BE.to = mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu;
BE.lone = bn_mont_one k n mu;
BE.lmul = bn_mont_mul k n mu;
BE.lsqr = bn_mont_sqr k n mu;
}
///////////////////////////////////////////////////////////////////////
inline_for_extraction noextract
val mk_ctx:
#t:limb_t
-> len:BN.meta_len t
-> n:lbignum t len
-> r2:lbignum t len
-> ctx:lbignum t (len +! len) ->
Stack unit
(requires fun h ->
live h n /\ live h r2 /\ live h ctx /\
disjoint n ctx /\ disjoint r2 ctx /\
0 < bn_v h n /\ bn_v h r2 == pow2 (2 * bits t * v len) % bn_v h n)
(ensures fun h0 _ h1 -> modifies (loc ctx) h0 h1 /\
linv_ctx (as_seq h0 n) (as_seq h1 ctx)) | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false |
len: Hacl.Bignum.meta_len t ->
n: Hacl.Bignum.Definitions.lbignum t len ->
r2: Hacl.Bignum.Definitions.lbignum t len ->
ctx: Hacl.Bignum.Definitions.lbignum t (len +! len)
-> FStar.HyperStack.ST.Stack Prims.unit | FStar.HyperStack.ST.Stack | [] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.meta_len",
"Hacl.Bignum.Definitions.lbignum",
"Lib.IntTypes.op_Plus_Bang",
"Lib.IntTypes.U32",
"Lib.IntTypes.PUB",
"Prims._assert",
"Prims.eq2",
"Lib.Sequence.lseq",
"Hacl.Bignum.Definitions.limb",
"Lib.IntTypes.v",
"Lib.Sequence.sub",
"Lib.Buffer.as_seq",
"Lib.Buffer.MUT",
"Prims.unit",
"Lib.Sequence.eq_intro",
"FStar.Monotonic.HyperStack.mem",
"FStar.HyperStack.ST.get",
"Lib.Buffer.update_sub",
"FStar.UInt32.__uint_to_t"
] | [] | false | true | false | false | false | let mk_ctx #t len n r2 ctx =
| let h0 = ST.get () in
update_sub ctx 0ul len n;
let h1 = ST.get () in
assert (LSeq.sub (as_seq h1 ctx) 0 (v len) == as_seq h0 n);
update_sub ctx len len r2;
let h2 = ST.get () in
LSeq.eq_intro (LSeq.sub (as_seq h2 ctx) 0 (v len)) (LSeq.sub (as_seq h1 ctx) 0 (v len));
assert (LSeq.sub (as_seq h2 ctx) 0 (v len) == as_seq h0 n);
assert (LSeq.sub (as_seq h2 ctx) (v len) (v len) == as_seq h0 r2) | false |
Hacl.Bignum.MontExponentiation.fst | Hacl.Bignum.MontExponentiation.bn_exp_mont_vartime | val bn_exp_mont_vartime: #t:limb_t -> k:BM.mont t -> bn_exp_mont_st t k.BM.bn.BN.len | val bn_exp_mont_vartime: #t:limb_t -> k:BM.mont t -> bn_exp_mont_st t k.BM.bn.BN.len | let bn_exp_mont_vartime #t k n mu r2 aM bBits b resM =
if bBits <. size S.bn_exp_mont_vartime_threshold then
bn_exp_mont_bm_vartime k n mu r2 aM bBits b resM
else
bn_exp_mont_fw_vartime k 4ul n mu r2 aM bBits b resM | {
"file_name": "code/bignum/Hacl.Bignum.MontExponentiation.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 56,
"end_line": 290,
"start_col": 0,
"start_line": 286
} | module Hacl.Bignum.MontExponentiation
open FStar.HyperStack
open FStar.HyperStack.ST
open FStar.Mul
open Lib.IntTypes
open Lib.Buffer
open Hacl.Bignum.Definitions
module ST = FStar.HyperStack.ST
module LSeq = Lib.Sequence
module BD = Hacl.Spec.Bignum.Definitions
module SN = Hacl.Spec.Bignum
module SM = Hacl.Spec.Bignum.Montgomery
module BN = Hacl.Bignum
module BM = Hacl.Bignum.Montgomery
module LE = Lib.Exponentiation
module BE = Hacl.Impl.Exponentiation
module E = Hacl.Spec.Exponentiation.Lemmas
module S = Hacl.Spec.Bignum.MontExponentiation
#reset-options "--z3rlimit 50 --fuel 0 --ifuel 0"
// All operations are performed in the Montgomery domain!
inline_for_extraction noextract
let a_spec (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len{0 < BD.bn_v n}) =
Lib.NatMod.nat_mod (BD.bn_v n)
inline_for_extraction noextract
let linv (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len) : Type0 =
BD.bn_v a < BD.bn_v n
inline_for_extraction noextract
let refl (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (a:BD.lbignum t len{linv n a}) : a_spec n =
BD.bn_v a
inline_for_extraction noextract
let linv_ctx (#t:limb_t) (#len:SN.bn_len t) (n:BD.lbignum t len) (ctx:BD.lbignum t (len + len)) : Type0 =
let ctx_n = LSeq.sub ctx 0 len in
let ctx_r2 = LSeq.sub ctx len len in
ctx_n == n /\
0 < BD.bn_v n /\ BD.bn_v ctx_r2 = pow2 (2 * bits t * len) % BD.bn_v n
inline_for_extraction noextract
let mk_to_nat_mont_ll_comm_monoid
(t:limb_t)
(len:BN.meta_len t)
(n:BD.lbignum t (v len))
(mu:limb t{SM.bn_mont_pre n mu})
: BE.to_comm_monoid t len (len +! len) =
{
BE.a_spec = a_spec n;
BE.comm_monoid = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (BD.bn_v n) (v mu);
BE.linv_ctx = linv_ctx n;
BE.linv = linv n;
BE.refl = refl n;
}
inline_for_extraction noextract
val bn_mont_one:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lone_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_one #t k n mu ctx oneM =
[@inline_let] let len = k.BM.bn.BN.len in
let ctx_n = sub ctx 0ul len in
let ctx_r2 = sub ctx len len in
let h0 = ST.get () in
SM.bn_mont_one_lemma n mu (as_seq h0 ctx_r2);
BM.bn_mont_one len k.BM.from ctx_n mu ctx_r2 oneM
inline_for_extraction noextract
val bn_mont_mul:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lmul_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_mul #t k n mu ctx aM bM resM =
let h0 = ST.get () in
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 bM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.mul ctx_n mu aM bM resM
inline_for_extraction noextract
val bn_mont_sqr:
#t:limb_t
-> k:BM.mont t
-> n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len))
-> mu:limb t{SM.bn_mont_pre n mu} ->
BE.lsqr_st t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len)
(mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu)
let bn_mont_sqr #t k n mu ctx aM resM =
let h0 = ST.get () in
SM.bn_mont_sqr_lemma n mu (as_seq h0 aM);
SM.bn_mont_mul_lemma n mu (as_seq h0 aM) (as_seq h0 aM);
let ctx_n = sub ctx 0ul k.BM.bn.BN.len in
k.BM.sqr ctx_n mu aM resM
inline_for_extraction noextract
let mk_bn_mont_concrete_ops
(t:limb_t)
(k:BM.mont t)
(n:Ghost.erased (BD.lbignum t (v k.BM.bn.BN.len)))
(mu:limb t{SM.bn_mont_pre n mu}) :
BE.concrete_ops t k.BM.bn.BN.len (k.BM.bn.BN.len +! k.BM.bn.BN.len) =
{
BE.to = mk_to_nat_mont_ll_comm_monoid t k.BM.bn.BN.len n mu;
BE.lone = bn_mont_one k n mu;
BE.lmul = bn_mont_mul k n mu;
BE.lsqr = bn_mont_sqr k n mu;
}
///////////////////////////////////////////////////////////////////////
inline_for_extraction noextract
val mk_ctx:
#t:limb_t
-> len:BN.meta_len t
-> n:lbignum t len
-> r2:lbignum t len
-> ctx:lbignum t (len +! len) ->
Stack unit
(requires fun h ->
live h n /\ live h r2 /\ live h ctx /\
disjoint n ctx /\ disjoint r2 ctx /\
0 < bn_v h n /\ bn_v h r2 == pow2 (2 * bits t * v len) % bn_v h n)
(ensures fun h0 _ h1 -> modifies (loc ctx) h0 h1 /\
linv_ctx (as_seq h0 n) (as_seq h1 ctx))
let mk_ctx #t len n r2 ctx =
let h0 = ST.get () in
update_sub ctx 0ul len n;
let h1 = ST.get () in
assert (LSeq.sub (as_seq h1 ctx) 0 (v len) == as_seq h0 n);
update_sub ctx len len r2;
let h2 = ST.get () in
LSeq.eq_intro
(LSeq.sub (as_seq h2 ctx) 0 (v len))
(LSeq.sub (as_seq h1 ctx) 0 (v len));
assert (LSeq.sub (as_seq h2 ctx) 0 (v len) == as_seq h0 n);
assert (LSeq.sub (as_seq h2 ctx) (v len) (v len) == as_seq h0 r2)
noextract
let bn_exp_mont_pre
(#t:limb_t)
(#len:SN.bn_len t)
(n:BD.lbignum t len)
(mu:limb t)
(r2:BD.lbignum t len)
(aM:BD.lbignum t len)
(bBits:size_nat)
(b:BD.lbignum t (BD.blocks0 bBits (bits t)))
=
SM.bn_mont_pre n mu /\
BD.bn_v r2 == pow2 (2 * bits t * len) % BD.bn_v n /\
BD.bn_v b < pow2 bBits /\
BD.bn_v aM < BD.bn_v n
inline_for_extraction noextract
let bn_exp_mont_st (t:limb_t) (len:BN.meta_len t) =
n:lbignum t len
-> mu:limb t
-> r2:lbignum t len
-> aM:lbignum t len
-> bBits:size_t
-> b:lbignum t (blocks0 bBits (size (bits t)))
-> resM:lbignum t len ->
Stack unit
(requires fun h ->
live h n /\ live h aM /\ live h b /\ live h resM /\ live h r2 /\
disjoint resM aM /\ disjoint resM b /\ disjoint resM n /\ disjoint n aM /\
disjoint resM r2 /\ disjoint aM r2 /\ disjoint n r2 /\ disjoint aM b /\
bn_exp_mont_pre (as_seq h n) mu (as_seq h r2) (as_seq h aM) (v bBits) (as_seq h b))
(ensures fun h0 _ h1 -> modifies (loc aM |+| loc resM) h0 h1 /\
(let k1 = E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (bn_v h0 n) (v mu) in
bn_v h1 resM == LE.pow k1 (bn_v h0 aM) (bn_v h0 b)))
// This function is *NOT* constant-time on the exponent b.
inline_for_extraction noextract
val bn_exp_mont_bm_vartime: #t:limb_t -> k:BM.mont t -> bn_exp_mont_st t k.BM.bn.BN.len
let bn_exp_mont_bm_vartime #t k n mu r2 aM bBits b resM =
push_frame ();
let h0 = ST.get () in
[@inline_let] let len = k.BM.bn.BN.len in
[@inline_let] let bLen = blocks0 bBits (size (bits t)) in
let k1 = Ghost.hide (E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (bn_v h0 n) (v mu)) in
let ctx = create (len +! len) (uint #t #SEC 0) in
mk_ctx #t len n r2 ctx;
BE.lexp_rl_vartime len (len +! len) (mk_bn_mont_concrete_ops t k (as_seq h0 n) mu) ctx aM bLen bBits b resM;
LE.exp_rl_lemma k1 (bn_v h0 aM) (v bBits) (bn_v h0 b);
pop_frame ()
// This function is constant-time on the exponent b.
inline_for_extraction noextract
val bn_exp_mont_bm_consttime: #t:limb_t -> k:BM.mont t -> bn_exp_mont_st t k.BM.bn.BN.len
let bn_exp_mont_bm_consttime #t k n mu r2 aM bBits b resM =
push_frame ();
let h0 = ST.get () in
[@inline_let] let len = k.BM.bn.BN.len in
[@inline_let] let bLen = blocks0 bBits (size (bits t)) in
let k1 = Ghost.hide (E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (bn_v h0 n) (v mu)) in
let ctx = create (len +! len) (uint #t #SEC 0) in
mk_ctx #t len n r2 ctx;
BE.lexp_mont_ladder_swap_consttime len (len +! len) (mk_bn_mont_concrete_ops t k (as_seq h0 n) mu) ctx aM bLen bBits b resM;
LE.exp_mont_ladder_swap_lemma k1 (bn_v h0 aM) (v bBits) (bn_v h0 b);
LE.exp_mont_ladder_lemma k1 (bn_v h0 aM) (v bBits) (bn_v h0 b);
pop_frame ()
// This function is *NOT* constant-time on the exponent b.
inline_for_extraction noextract
val bn_exp_mont_fw_vartime:
#t:limb_t
-> k:BM.mont t
-> l:size_t{0 < v l /\ v l < bits U32 /\ pow2 (v l) * v k.BM.bn.BN.len <= max_size_t} ->
bn_exp_mont_st t k.BM.bn.BN.len
let bn_exp_mont_fw_vartime #t k l n mu r2 aM bBits b resM =
push_frame ();
let h0 = ST.get () in
[@inline_let] let len = k.BM.bn.BN.len in
let bLen = blocks0 bBits (size (bits t)) in
let k1 = Ghost.hide (E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (bn_v h0 n) (v mu)) in
let ctx = create (len +! len) (uint #t #SEC 0) in
mk_ctx #t len n r2 ctx;
BE.lexp_fw_vartime len (len +! len) (mk_bn_mont_concrete_ops t k (as_seq h0 n) mu) l ctx aM bLen bBits b resM;
LE.exp_fw_lemma k1 (bn_v h0 aM) (v bBits) (bn_v h0 b) (v l);
pop_frame ()
// This function is constant-time on the exponent b.
inline_for_extraction noextract
val bn_exp_mont_fw_consttime:
#t:limb_t
-> k:BM.mont t
-> l:size_t{0 < v l /\ v l < bits U32 /\ pow2 (v l) * v k.BM.bn.BN.len <= max_size_t} ->
bn_exp_mont_st t k.BM.bn.BN.len
let bn_exp_mont_fw_consttime #t k l n mu r2 aM bBits b resM =
push_frame ();
let h0 = ST.get () in
[@inline_let] let len = k.BM.bn.BN.len in
let bLen = blocks0 bBits (size (bits t)) in
let k1 = Ghost.hide (E.mk_nat_mont_ll_comm_monoid (bits t) (v len) (bn_v h0 n) (v mu)) in
let ctx = create (len +! len) (uint #t #SEC 0) in
mk_ctx #t len n r2 ctx;
BE.lexp_fw_consttime len (len +! len) (mk_bn_mont_concrete_ops t k (as_seq h0 n) mu) l ctx aM bLen bBits b resM;
LE.exp_fw_lemma k1 (bn_v h0 aM) (v bBits) (bn_v h0 b) (v l);
pop_frame ()
///////////////////////////////////////////////
// This function is *NOT* constant-time on the exponent b.
inline_for_extraction noextract | {
"checked_file": "/",
"dependencies": [
"prims.fst.checked",
"Lib.Sequence.fsti.checked",
"Lib.NatMod.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.Exponentiation.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Spec.Exponentiation.Lemmas.fst.checked",
"Hacl.Spec.Bignum.Montgomery.fsti.checked",
"Hacl.Spec.Bignum.MontExponentiation.fst.checked",
"Hacl.Spec.Bignum.Definitions.fst.checked",
"Hacl.Spec.Bignum.fsti.checked",
"Hacl.Impl.Exponentiation.fsti.checked",
"Hacl.Bignum.Montgomery.fsti.checked",
"Hacl.Bignum.Definitions.fst.checked",
"Hacl.Bignum.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Ghost.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Bignum.MontExponentiation.fst"
} | [
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.MontExponentiation",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Exponentiation.Lemmas",
"short_module": "E"
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Exponentiation",
"short_module": "BE"
},
{
"abbrev": true,
"full_module": "Lib.Exponentiation",
"short_module": "LE"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum.Montgomery",
"short_module": "BM"
},
{
"abbrev": true,
"full_module": "Hacl.Bignum",
"short_module": "BN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Montgomery",
"short_module": "SM"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum",
"short_module": "SN"
},
{
"abbrev": true,
"full_module": "Hacl.Spec.Bignum.Definitions",
"short_module": "BD"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LSeq"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": false,
"full_module": "Hacl.Bignum.Definitions",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.Buffer",
"short_module": null
},
{
"abbrev": false,
"full_module": "Lib.IntTypes",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack.ST",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.HyperStack",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Bignum",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 0,
"initial_ifuel": 0,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | k: Hacl.Bignum.Montgomery.mont t
-> Hacl.Bignum.MontExponentiation.bn_exp_mont_st t (Mkbn?.len (Mkmont?.bn k)) | Prims.Tot | [
"total"
] | [] | [
"Hacl.Bignum.Definitions.limb_t",
"Hacl.Bignum.Montgomery.mont",
"Hacl.Bignum.Definitions.lbignum",
"Hacl.Bignum.__proj__Mkbn__item__len",
"Hacl.Bignum.Montgomery.__proj__Mkmont__item__bn",
"Hacl.Bignum.Definitions.limb",
"Lib.IntTypes.size_t",
"Hacl.Bignum.Definitions.blocks0",
"Lib.IntTypes.size",
"Lib.IntTypes.bits",
"Lib.IntTypes.op_Less_Dot",
"Lib.IntTypes.U32",
"Hacl.Spec.Bignum.MontExponentiation.bn_exp_mont_vartime_threshold",
"Hacl.Bignum.MontExponentiation.bn_exp_mont_bm_vartime",
"Prims.unit",
"Prims.bool",
"Hacl.Bignum.MontExponentiation.bn_exp_mont_fw_vartime",
"FStar.UInt32.__uint_to_t"
] | [] | false | false | false | false | false | let bn_exp_mont_vartime #t k n mu r2 aM bBits b resM =
| if bBits <. size S.bn_exp_mont_vartime_threshold
then bn_exp_mont_bm_vartime k n mu r2 aM bBits b resM
else bn_exp_mont_fw_vartime k 4ul n mu r2 aM bBits b resM | false |
Hacl.Streaming.Blake2.Common.fst | Hacl.Streaming.Blake2.Common.state_v | val state_v (#a: alg) (#m: m_spec) (h: HS.mem) (s: s a m) : GTot (Spec.state a) | val state_v (#a: alg) (#m: m_spec) (h: HS.mem) (s: s a m) : GTot (Spec.state a) | let state_v (#a : alg) (#m : m_spec) (h : HS.mem) (s : s a m) : GTot (Spec.state a) =
Core.state_v h (get_state_p s) | {
"file_name": "code/streaming/Hacl.Streaming.Blake2.Common.fst",
"git_rev": "eb1badfa34c70b0bbe0fe24fe0f49fb1295c7872",
"git_url": "https://github.com/project-everest/hacl-star.git",
"project_name": "hacl-star"
} | {
"end_col": 32,
"end_line": 75,
"start_col": 0,
"start_line": 74
} | module Hacl.Streaming.Blake2.Common
module HS = FStar.HyperStack
module B = LowStar.Buffer
module S = FStar.Seq
module LS = Lib.Sequence
module U32 = FStar.UInt32
module U64 = FStar.UInt64
module U128 = FStar.UInt128
module I = Hacl.Streaming.Interface
module ST = FStar.HyperStack.ST
open FStar.Mul
module Loops = Lib.LoopCombinators
/// Opening a bunch of modules for Blake2
/// =====================================
inline_for_extraction noextract
let uint8 = Lib.IntTypes.uint8
inline_for_extraction noextract
let uint32 = Lib.IntTypes.uint32
unfold noextract
let size_nat = Lib.IntTypes.size_nat
unfold noextract
let max_key = Spec.Blake2.max_key
unfold noextract
let lbytes = Lib.ByteSequence.lbytes
module Spec = Spec.Blake2
module Core = Hacl.Impl.Blake2.Core
open Hacl.Impl.Blake2.Generic
/// An instance of the stateful type class for blake2
/// =================================================
#set-options "--max_fuel 0 --max_ifuel 0 --z3rlimit 50"
inline_for_extraction noextract
let index = unit
inline_for_extraction noextract
let alg = Spec.alg
inline_for_extraction noextract
let m_spec = Core.m_spec
/// The stateful state: (wv, hash)
inline_for_extraction noextract
let s (a : alg) (m : m_spec) = Core.(state_p a m & state_p a m)
inline_for_extraction noextract
let t (a : alg) = Spec.state a
(* In the internal state, we keep wv, the working vector. It's essentially
temporary scratch space that the Blake2 implementation expects to receive. (Why
is the implementation not performing its own stack allocations? Don't know!) *)
inline_for_extraction noextract
let get_wv (#a : alg) (#m : m_spec) (s : s a m) : Tot (Core.state_p a m) =
match s with wv, _ -> wv
inline_for_extraction noextract
let get_state_p (#a : alg) (#m : m_spec) (s : s a m) : Tot (Core.state_p a m) =
match s with _, p -> p
(* But the working vector is not reflected in the state at all -- it doesn't
have meaningful specification contents. *) | {
"checked_file": "/",
"dependencies": [
"Spec.Blake2.Alternative.fsti.checked",
"Spec.Blake2.fst.checked",
"prims.fst.checked",
"LowStar.Buffer.fst.checked",
"Lib.UpdateMulti.fst.checked",
"Lib.Sequence.Lemmas.fsti.checked",
"Lib.Sequence.fsti.checked",
"Lib.LoopCombinators.fsti.checked",
"Lib.IntTypes.fsti.checked",
"Lib.ByteSequence.fsti.checked",
"Lib.Buffer.fsti.checked",
"Hacl.Streaming.Interface.fsti.checked",
"Hacl.Impl.Blake2.Generic.fst.checked",
"Hacl.Impl.Blake2.Core.fsti.checked",
"FStar.UInt64.fsti.checked",
"FStar.UInt32.fsti.checked",
"FStar.UInt128.fsti.checked",
"FStar.Seq.fst.checked",
"FStar.Pervasives.Native.fst.checked",
"FStar.Pervasives.fsti.checked",
"FStar.Mul.fst.checked",
"FStar.Math.Lemmas.fst.checked",
"FStar.HyperStack.ST.fsti.checked",
"FStar.HyperStack.fst.checked",
"FStar.Classical.Sugar.fsti.checked",
"FStar.Classical.fsti.checked",
"FStar.Calc.fsti.checked"
],
"interface_file": false,
"source_file": "Hacl.Streaming.Blake2.Common.fst"
} | [
{
"abbrev": false,
"full_module": "Hacl.Impl.Blake2.Generic",
"short_module": null
},
{
"abbrev": true,
"full_module": "Hacl.Impl.Blake2.Core",
"short_module": "Core"
},
{
"abbrev": true,
"full_module": "Spec.Blake2",
"short_module": "Spec"
},
{
"abbrev": true,
"full_module": "Lib.LoopCombinators",
"short_module": "Loops"
},
{
"abbrev": false,
"full_module": "FStar.Mul",
"short_module": null
},
{
"abbrev": true,
"full_module": "FStar.HyperStack.ST",
"short_module": "ST"
},
{
"abbrev": true,
"full_module": "Hacl.Streaming.Interface",
"short_module": "I"
},
{
"abbrev": true,
"full_module": "FStar.UInt128",
"short_module": "U128"
},
{
"abbrev": true,
"full_module": "FStar.UInt64",
"short_module": "U64"
},
{
"abbrev": true,
"full_module": "FStar.UInt32",
"short_module": "U32"
},
{
"abbrev": true,
"full_module": "Lib.Sequence",
"short_module": "LS"
},
{
"abbrev": true,
"full_module": "FStar.Seq",
"short_module": "S"
},
{
"abbrev": true,
"full_module": "LowStar.Buffer",
"short_module": "B"
},
{
"abbrev": true,
"full_module": "FStar.HyperStack",
"short_module": "HS"
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "Hacl.Streaming.Blake2",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar.Pervasives",
"short_module": null
},
{
"abbrev": false,
"full_module": "Prims",
"short_module": null
},
{
"abbrev": false,
"full_module": "FStar",
"short_module": null
}
] | {
"detail_errors": false,
"detail_hint_replay": false,
"initial_fuel": 2,
"initial_ifuel": 1,
"max_fuel": 0,
"max_ifuel": 0,
"no_plugins": false,
"no_smt": false,
"no_tactics": false,
"quake_hi": 1,
"quake_keep": false,
"quake_lo": 1,
"retry": false,
"reuse_hint_for": null,
"smtencoding_elim_box": false,
"smtencoding_l_arith_repr": "boxwrap",
"smtencoding_nl_arith_repr": "boxwrap",
"smtencoding_valid_elim": false,
"smtencoding_valid_intro": true,
"tcnorm": true,
"trivial_pre_for_unannotated_effectful_fns": false,
"z3cliopt": [],
"z3refresh": false,
"z3rlimit": 50,
"z3rlimit_factor": 1,
"z3seed": 0,
"z3smtopt": [],
"z3version": "4.8.5"
} | false | h: FStar.Monotonic.HyperStack.mem -> s: Hacl.Streaming.Blake2.Common.s a m
-> Prims.GTot (Spec.Blake2.Definitions.state a) | Prims.GTot | [
"sometrivial"
] | [] | [
"Hacl.Streaming.Blake2.Common.alg",
"Hacl.Streaming.Blake2.Common.m_spec",
"FStar.Monotonic.HyperStack.mem",
"Hacl.Streaming.Blake2.Common.s",
"Hacl.Impl.Blake2.Core.state_v",
"Hacl.Streaming.Blake2.Common.get_state_p",
"Spec.Blake2.Definitions.state"
] | [] | false | false | false | false | false | let state_v (#a: alg) (#m: m_spec) (h: HS.mem) (s: s a m) : GTot (Spec.state a) =
| Core.state_v h (get_state_p s) | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.